Skip to content

Commit 5200ee6

Browse files
committed
changed to multiplatform build
1 parent 8238aa0 commit 5200ee6

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/docker-publish.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,22 @@ jobs:
1313
- name: Checkout code
1414
uses: actions/checkout@v4
1515

16-
# 1. Set up Docker Buildx (required for GHA caching)
16+
# 1. Set up QEMU (Required for multi-platform builds)
17+
- name: Set up QEMU
18+
uses: docker/setup-qemu-action@v3
19+
20+
# 2. Set up Docker Buildx
1721
- name: Set up Docker Buildx
1822
uses: docker/setup-buildx-action@v3
1923

20-
# 2. Login to Docker Hub using your personal credentials stored in Org secrets
24+
# 3. Login to Docker Hub
2125
- name: Login to Docker Hub
2226
uses: docker/login-action@v3
2327
with:
2428
username: ${{ secrets.DOCKERHUB_USERNAME }}
2529
password: ${{ secrets.DOCKERHUB_API_KEY }}
2630

27-
# 3. Extract metadata - Pointed to CDRL namespace
31+
# 4. Extract metadata
2832
- name: Extract metadata
2933
id: meta
3034
uses: docker/metadata-action@v5
@@ -35,12 +39,14 @@ jobs:
3539
type=sha,format=short
3640
latest
3741
38-
# 4. Build and Push with GHA Cache
42+
# 5. Build and Push with Multi-Platform Support
3943
- name: Build and push
4044
uses: docker/build-push-action@v5
4145
with:
4246
context: .
4347
push: true
48+
# This creates a "Manifest List" containing both versions
49+
platforms: linux/amd64, linux/arm64
4450
tags: ${{ steps.meta.outputs.tags }}
4551
labels: ${{ steps.meta.outputs.labels }}
4652
cache-from: type=gha

0 commit comments

Comments
 (0)