44 lines
1.3 KiB
YAML
44 lines
1.3 KiB
YAML
name: Build container
|
|
on:
|
|
push:
|
|
pull_request:
|
|
branches: ["main"]
|
|
schedule:
|
|
- cron: "0 16 * * FRI"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Clone repo
|
|
uses: actions/checkout@v4
|
|
- name: Setup Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
- name: Login to Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Build and push base container
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: ./containers/base
|
|
file: ./containers/base/Containerfile
|
|
push: true
|
|
tags: ghcr.io/${{ github.repository_owner }}/base:latest
|
|
- name: Build and push go container
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: ./containers/go
|
|
file: ./containers/go/Containerfile
|
|
push: true
|
|
tags: ghcr.io/${{ github.repository_owner }}/go:latest
|
|
- name: Build and push infra container
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: ./containers/infra
|
|
file: ./containers/infra/Containerfile
|
|
push: true
|
|
tags: ghcr.io/${{ github.repository_owner }}/infra:latest
|