From 8a7e7515a045f3cb0e5dc357c2f0220b8a1c1928 Mon Sep 17 00:00:00 2001 From: realkaranvir <113927390+realkaranvir@users.noreply.github.com> Date: Sat, 7 Dec 2024 16:58:20 -0800 Subject: [PATCH] attempting to create different caches for each platform --- .github/workflows/docker-image.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 1f0c319b1..9f163a79a 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -12,6 +12,9 @@ jobs: build_and_push_docker_image: name: Push Docker Image to Docker Hub runs-on: ubuntu-latest + strategy: + matrix: + platform: [linux/amd64, linux/arm64] steps: - name: Checkout Repository @@ -32,9 +35,9 @@ jobs: path: | root/.ivy2 root/.sbt - key: sbt-${{ runner.os }}-${{ hashFiles('**/build.sbt', '**/project/*.sbt') }} + key: sbt-${{ runner.os }}-${{ matrix.platform }}-${{ hashFiles('**/build.sbt', '**/project/*.sbt') }} restore-keys: | - sbt-${{ runner.os }}- + sbt-${{ runner.os }}-${{ matrix.platform }} - name: Inject sbt cache into Docker uses: reproducible-containers/buildkit-cache-dance@v3.1.0 @@ -50,6 +53,7 @@ jobs: uses: docker/build-push-action@v5 with: context: . + platforms: ${{ matrix.platform }} cache-from: type=gha cache-to: type=gha,mode=max push: ${{ github.event_name != 'pull_request' }}