Skip to content

Commit ff2386f

Browse files
committed
fix: Multi-arch builds as one step
1 parent f154caa commit ff2386f

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/build-push.yaml

+9-6
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,14 @@ on:
1919

2020
jobs:
2121
build-and-push:
22-
strategy:
23-
matrix:
24-
arch:
25-
- linux/amd64
26-
- linux/arm64
22+
## The matrix build doesn't work right now, because the push step for the slowest arch
23+
## will overwrite the metadata for the faster arch.
24+
## We should implement this to fix it: https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners
25+
# strategy:
26+
# matrix:
27+
# arch:
28+
# - linux/amd64
29+
# - linux/arm64
2730
permissions:
2831
packages: write
2932
contents: read
@@ -58,7 +61,7 @@ jobs:
5861
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
5962
with:
6063
context: .
61-
platforms: "${{ matrix.arch }}"
64+
platforms: linux/amd64,linux/arm64
6265
push: ${{ github.ref == 'refs/heads/master' }}
6366
tags: |
6467
ghcr.io/${{ github.repository }}:latest

0 commit comments

Comments
 (0)