Skip to content

Commit 77c31c2

Browse files
committed
feat: add multi-stage container build to github actions
1 parent a73cd19 commit 77c31c2

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/build_image.yml renamed to .github/workflows/build_images.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,17 @@ jobs:
4545
type=semver,pattern={{major}}
4646
type=edge,branch=main
4747
48+
- name: Extract metadata (tags, labels) for Docker (worker)
49+
id: meta_worker
50+
uses: docker/metadata-action@v5
51+
with:
52+
images: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}
53+
tags: |
54+
type=semver,pattern={{version}},suffix=-worker
55+
type=semver,pattern={{major}}.{{minor}},suffix=-worker
56+
type=semver,pattern={{major}},suffix=-worker
57+
type=edge,branch=main,suffix=-worker
58+
4859
# Build and push multi-arch prod image
4960
- name: Build and push prod Docker image (Multi-Arch)
5061
uses: docker/build-push-action@v6
@@ -56,3 +67,15 @@ jobs:
5667
tags: ${{ steps.meta_prod.outputs.tags }}
5768
labels: ${{ steps.meta_prod.outputs.labels }}
5869
target: prod
70+
71+
# Build and push multi-arch worker image
72+
- name: Build and push worker Docker image (Multi-Arch)
73+
uses: docker/build-push-action@v6
74+
with:
75+
context: .
76+
file: ./Dockerfile
77+
push: true
78+
platforms: linux/amd64,linux/arm64/v8
79+
tags: ${{ steps.meta_worker.outputs.tags }}
80+
labels: ${{ steps.meta_worker.outputs.labels }}
81+
target: worker

0 commit comments

Comments
 (0)