From 7e81a0daa23f1c17776d63bc2b60c0611febd376 Mon Sep 17 00:00:00 2001 From: Tristan Date: Fri, 22 Nov 2024 06:04:35 +0000 Subject: [PATCH] Split docker layer caching by upstream image tag --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70229d7..fc73871 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,10 +35,10 @@ jobs: - name: Cache Docker layers uses: actions/cache@v4 with: - path: ${{ env.DOCKER_LAYER_CACHE }} - key: ${{ runner.os }}-buildx-${{ github.sha }} + path: ${{ env.DOCKER_LAYER_CACHE }}-${{ matrix.MCROUTER_UPSTREAM_IMAGE_TAG }} + key: ${{ runner.os }}-buildx-${{ matrix.MCROUTER_UPSTREAM_IMAGE_TAG }}-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx- + ${{ runner.os }}-buildx-${{ matrix.MCROUTER_UPSTREAM_IMAGE_TAG }}- - name: Log in to the Container registry uses: docker/login-action@v3 @@ -69,5 +69,5 @@ jobs: tags: ${{ steps.meta.outputs.tags }} build-args: | MCROUTER_UPSTREAM_IMAGE_TAG=${{ matrix.MCROUTER_UPSTREAM_IMAGE_TAG }} - cache-from: type=local,src=${{ env.DOCKER_LAYER_CACHE }} - cache-to: type=local,dest=${{ env.DOCKER_LAYER_CACHE }} + cache-from: type=local,src=${{ env.DOCKER_LAYER_CACHE }}-${{ matrix.MCROUTER_UPSTREAM_IMAGE_TAG }} + cache-to: type=local,dest=${{ env.DOCKER_LAYER_CACHE }}-${{ matrix.MCROUTER_UPSTREAM_IMAGE_TAG }}