feat: make container builds parallel
This commit is contained in:
27
.github/workflows/ci.yaml
vendored
27
.github/workflows/ci.yaml
vendored
@@ -7,14 +7,17 @@ on:
|
|||||||
- cron: "0 16 * * FRI"
|
- cron: "0 16 * * FRI"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
base-build:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- name: Clone repo
|
- &clone_repo
|
||||||
|
name: Clone repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Setup Docker Buildx
|
- &setup_buildx
|
||||||
|
name: Setup Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
- name: Login to Registry
|
- &login_registry
|
||||||
|
name: Login to Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
@@ -27,6 +30,14 @@ jobs:
|
|||||||
file: ./containers/base/Containerfile
|
file: ./containers/base/Containerfile
|
||||||
push: true
|
push: true
|
||||||
tags: ghcr.io/${{ github.repository_owner }}/base:latest
|
tags: ghcr.io/${{ github.repository_owner }}/base:latest
|
||||||
|
|
||||||
|
go-build:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
needs: base-build
|
||||||
|
steps:
|
||||||
|
- *clone_repo
|
||||||
|
- *setup_buildx
|
||||||
|
- *login_registry
|
||||||
- name: Build and push go container
|
- name: Build and push go container
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
@@ -34,6 +45,14 @@ jobs:
|
|||||||
file: ./containers/go/Containerfile
|
file: ./containers/go/Containerfile
|
||||||
push: true
|
push: true
|
||||||
tags: ghcr.io/${{ github.repository_owner }}/go:latest
|
tags: ghcr.io/${{ github.repository_owner }}/go:latest
|
||||||
|
|
||||||
|
infra-build:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
needs: base-build
|
||||||
|
steps:
|
||||||
|
- *clone_repo
|
||||||
|
- *setup_buildx
|
||||||
|
- *login_registry
|
||||||
- name: Build and push infra container
|
- name: Build and push infra container
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user