Skip to content

Commit

Permalink
Split docker layer caching by upstream image tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Tristan971 committed Nov 22, 2024
1 parent 3c85f62 commit 7e81a0d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}

0 comments on commit 7e81a0d

Please sign in to comment.