Skip to content

Commit 2ea5321

Browse files
authored
ci: parallel multiarch build (#130)
1 parent e5cdfde commit 2ea5321

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ on:
1818
jobs:
1919
build:
2020
runs-on: ubuntu-latest
21+
strategy:
22+
matrix:
23+
platform: [ linux/amd64, linux/arm64 ]
2124
steps:
2225
- uses: actions/checkout@v3
2326
- uses: actions/cache@v2
@@ -52,14 +55,15 @@ jobs:
5255
- name: Set up QEMU
5356
uses: docker/setup-qemu-action@v1
5457
- name: Set up Docker Buildx
55-
id: buildx
58+
if: ${{ matrix.platform != 'linux/amd64' }}
5659
uses: docker/setup-buildx-action@v1
57-
- name: Build and push image
60+
id: buildx
61+
- name: Build and push image (${{ matrix.platform }})
5862
uses: docker/build-push-action@v2
5963
with:
6064
context: .
6165
file: ./build/Dockerfile
62-
platforms: linux/amd64,linux/arm64
66+
platforms: ${{ matrix.platform }}
6367
tags: ${{ steps.meta.outputs.tags }}
6468
labels: ${{ steps.meta.outputs.labels }}
6569
build-args: |

0 commit comments

Comments
 (0)