From b3fc475a88ac264ab3de9e36e4011c73aa841888 Mon Sep 17 00:00:00 2001 From: Conlan Cesar Date: Wed, 2 Oct 2024 01:06:04 -0400 Subject: [PATCH] Scope cache --- .github/workflows/docker-publish.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-publish.yaml b/.github/workflows/docker-publish.yaml index 312ea3449..edbba7718 100644 --- a/.github/workflows/docker-publish.yaml +++ b/.github/workflows/docker-publish.yaml @@ -15,7 +15,12 @@ jobs: arch: linux/amd64 - os: ubuntu-latest # change this to the native arm runner when Github makes it public arch: linux/arm64 - steps: + steps: + - name: Prepare + run: | + platform=${{ matrix.arch }} + echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV + - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -30,7 +35,7 @@ jobs: file: docker/Dockerfile target: base cache-from: type=gha - cache-to: type=gha,mode=max + cache-to: type=gha,mode=max,scope=${{ env.PLATFORM_PAIR }} build: runs-on: ubuntu-latest