From 4b9df99f3057432731d583a86b258108e2ca10f5 Mon Sep 17 00:00:00 2001 From: Chris Lo <46541035+topher-lo@users.noreply.github.com> Date: Mon, 9 Dec 2024 19:20:26 -0800 Subject: [PATCH] ci(build): Run ARM docker builds on ARM runners (#594) --- .github/workflows/build-push-images.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-push-images.yml b/.github/workflows/build-push-images.yml index 0f346e42e..55e2bc088 100644 --- a/.github/workflows/build-push-images.yml +++ b/.github/workflows/build-push-images.yml @@ -12,7 +12,14 @@ permissions: jobs: push-api-to-ghcr: - runs-on: ubuntu-latest + runs-on: ${{ matrix.runner }} + strategy: + matrix: + include: + - platform: linux/amd64 + runner: ubuntu-latest + - platform: linux/arm64 + runner: ubuntu-arm64-latest steps: - name: Checkout repository uses: actions/checkout@v4 @@ -48,7 +55,7 @@ jobs: with: context: . push: true - platforms: linux/amd64,linux/arm64 + platforms: ${{ matrix.platform }} tags: | ${{ steps.meta.outputs.tags }} ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && 'ghcr.io/tracecathq/tracecat:latest' || '' }} @@ -57,7 +64,14 @@ jobs: cache-to: type=gha,mode=max push-ui-to-ghcr: - runs-on: ubuntu-latest + runs-on: ${{ matrix.runner }} + strategy: + matrix: + include: + - platform: linux/amd64 + runner: ubuntu-latest + - platform: linux/arm64 + runner: ubuntu-arm64-latest steps: - name: Checkout repository uses: actions/checkout@v4 @@ -106,7 +120,7 @@ jobs: NEXT_SERVER_API_URL=${{ env.NEXT_SERVER_API_URL }} NODE_ENV=${{ env.NODE_ENV }} push: true - platforms: linux/amd64,linux/arm64 + platforms: ${{ matrix.platform }} tags: ${{ steps.meta.outputs.tags }} ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && 'ghcr.io/tracecathq/tracecat-ui:latest' || '' }} labels: ${{ steps.meta.outputs.labels }}