From a573e176ab343fd5e7980a5151794553d598ceeb Mon Sep 17 00:00:00 2001 From: Dani Aschwanden Date: Sat, 4 May 2024 02:09:30 +0200 Subject: [PATCH] enable multiplatform builds (#363) * enable multiplatform builds * Update docker-image.yml --- .github/workflows/docker-image.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 77ef9ffc..00792c50 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -14,8 +14,18 @@ on: jobs: build: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + platform: + - linux/amd64 + - linux/arm64 name: "Test and Build" steps: + - name: Prepare + run: | + platform=${{ matrix.platform }} + echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV - name: Checkout uses: actions/checkout@v4 - uses: actions/checkout@v4 @@ -24,6 +34,8 @@ jobs: node-version-file: ".nvmrc" cache: yarn cache-dependency-path: "ui/yarn.lock" + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 - name: Docker meta id: meta uses: docker/metadata-action@v5 @@ -70,6 +82,7 @@ jobs: with: context: . push: ${{ github.event_name != 'pull_request' }} + platforms: ${{ matrix.platform }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | @@ -97,6 +110,7 @@ jobs: with: context: . file: Dockerfile.hasura + platforms: ${{ matrix.platform }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta-hasura.outputs.tags }} labels: ${{ steps.meta-hasura.outputs.labels }}