Skip to content

Commit 54036dd

Browse files
authored
Add matrix strategy for Docker build runners
1 parent 7d1d987 commit 54036dd

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/workflow.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@ jobs:
3939

4040
build-docker:
4141
if: github.event_name != 'pull_request'
42-
needs: [build-rs, build-ng]
43-
runs-on: ubuntu-latest
42+
needs: [build-rs, build-ng]
43+
strategy:
44+
matrix:
45+
runner: [ubuntu-latest, ubuntu-24.04-arm64]
46+
runs-on: ${{ matrix.runner }}
4447
steps:
4548
- uses: actions/checkout@v6
4649
- run: |
@@ -52,6 +55,7 @@ jobs:
5255
REF_NAME_CLEAN="0$REF_NAME_CLEAN"
5356
fi
5457
echo "CLEANED_REF_NAME=$REF_NAME_CLEAN" >> $GITHUB_ENV
58+
5559
- uses: docker/setup-qemu-action@v3
5660
- uses: docker/setup-buildx-action@v3
5761
- uses: docker/login-action@v3
@@ -65,21 +69,20 @@ jobs:
6569
username: ${{ secrets.DOCKERHUB_USERNAME }}
6670
password: ${{ secrets.DOCKERHUB_TOKEN }}
6771
repository: ${{ github.repository }}
68-
short-description: ${{ github.event.repository.description }}
72+
short-description: ${{ github.event.repository.description }}
73+
6974
- uses: docker/build-push-action@v6
7075
if: startsWith(github.ref, 'refs/tags/')
7176
with:
7277
context: .
7378
push: true
74-
platforms: linux/amd64,linux/arm64
7579
tags: ${{ github.repository }}:latest,${{ github.repository }}:${{ github.ref_name }}
7680
build-args: VERSION_ARG=v${{ github.ref_name }}
81+
7782
- uses: docker/build-push-action@v6
7883
if: startsWith(github.ref, 'refs/heads/')
7984
with:
8085
context: .
8186
push: true
82-
platforms: linux/amd64,linux/arm64
8387
tags: ${{ github.repository }}:${{ env.CLEANED_REF_NAME }}
8488
build-args: VERSION_ARG=${{ github.sha }}@${{ env.CLEANED_REF_NAME }}
85-

0 commit comments

Comments
 (0)