From 051a0bdb7c8f9821e75ad34ab41b2bef4b6b6e55 Mon Sep 17 00:00:00 2001 From: 839 <8398a7@gmail.com> Date: Sun, 26 Jan 2025 23:13:49 +0900 Subject: [PATCH] add arm runner --- .github/workflows/ci.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a4d331f..e7f6c04d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,9 +63,22 @@ jobs: path: ./tmp/test-results build: if: contains(github.ref, 'master') - runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + platform: linux/amd64 + - os: ubuntu-24.04-arm + platform: linux/arm64 + runs-on: ${{ matrix.os }} needs: [test] steps: + - name: Prepare + run: | + platform=${{ matrix.platform }} + echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV + echo "REGISTRY_IMAGE=`echo ghcr.io/${{github.repository}} | tr '[:upper:]' '[:lower:]'`" >> ${GITHUB_ENV} - uses: actions/checkout@v1 - name: Get short SHA id: vars @@ -85,8 +98,9 @@ jobs: push: true tags: | ghcr.io/8398a7/abilitysheet/app:${{ env.SHA_TAG }} - cache-from: type=gha - cache-to: type=gha,mode=max + cache-from: type=gha,scope=platform-${{ env.PLATFORM_PAIR }} + cache-to: type=gha,mode=max,scope=platform-${{ env.PLATFORM_PAIR }} + platforms: ${{ matrix.platform }} - uses: actions/delete-package-versions@v5 with: package-name: abilitysheet/app