use matrix to build amd64/arm64 images

This commit is contained in:
Amruth Pillai
2023-06-07 20:25:12 +02:00
parent 726ea7312b
commit 30fd283898

View File

@ -13,6 +13,7 @@ jobs:
strategy: strategy:
matrix: matrix:
image: [client, server] image: [client, server]
arch: [linux/amd64, linux/arm64]
steps: steps:
- name: Checkout the repository - name: Checkout the repository
@ -25,7 +26,7 @@ jobs:
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v2.1.0 uses: docker/setup-qemu-action@v2.1.0
with: with:
platforms: amd64,arm platforms: ${{ matrix.arch }}
- id: buildx - id: buildx
name: Set up Docker Buildx name: Set up Docker Buildx
@ -49,7 +50,7 @@ jobs:
with: with:
context: . context: .
push: true push: true
platforms: linux/amd64,linux/arm64 platforms: ${{ matrix.arch }}
file: ${{ matrix.image }}/Dockerfile file: ${{ matrix.image }}/Dockerfile
build-args: | build-args: |
TURBO_TOKEN=${{ secrets.TURBO_TOKEN }} TURBO_TOKEN=${{ secrets.TURBO_TOKEN }}