Skip to content

Commit

Permalink
Modifies caching strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
tdstein committed Sep 13, 2023
1 parent 561bfad commit 3c830a6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
id: cache-docker-image-restore
uses: actions/cache/restore@v3
env:
cache-name: cache-docker-image
cache-name: cache-${{ github.ref }}
with:
path: /tmp/build-image.tar
key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('build/package/Dockerfile') }}
Expand All @@ -65,7 +65,7 @@ jobs:
id: cache-docker-image-save
uses: actions/cache/save@v3
env:
cache-name: cache-docker-image
cache-name: cache-${{ github.ref }}
with:
path: /tmp/build-image.tar
key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('build/package/Dockerfile') }}
Expand All @@ -89,7 +89,7 @@ jobs:
id: cache-docker-image
uses: actions/cache/restore@v3
env:
cache-name: cache-docker-image
cache-name: cache-${{ github.ref }}
with:
path: /tmp/build-image.tar
key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }}
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
id: cache-docker-image
uses: actions/cache/restore@v3
env:
cache-name: cache-docker-image
cache-name: cache-${{ github.ref }}
with:
path: /tmp/build-image.tar
key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }}
Expand Down Expand Up @@ -199,7 +199,7 @@ jobs:
id: cache-docker-image
uses: actions/cache/restore@v3
env:
cache-name: cache-docker-image
cache-name: cache-${{ github.ref }}
with:
path: /tmp/build-image.tar
key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }}
Expand Down Expand Up @@ -250,7 +250,7 @@ jobs:
id: cache-docker-image
uses: actions/cache/restore@v3
env:
cache-name: cache-docker-image
cache-name: cache-${{ github.ref }}
with:
path: /tmp/build-image.tar
key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }}
Expand Down Expand Up @@ -288,7 +288,7 @@ jobs:
id: cache-docker-image
uses: actions/cache/restore@v3
env:
cache-name: cache-docker-image
cache-name: cache-${{ github.ref }}
with:
path: /tmp/build-image.tar
key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }}
Expand Down Expand Up @@ -336,7 +336,7 @@ jobs:
id: cache-docker-image
uses: actions/cache/restore@v3
env:
cache-name: cache-docker-image
cache-name: cache-${{ github.ref }}
with:
path: /tmp/build-image.tar
key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }}
Expand Down Expand Up @@ -488,7 +488,7 @@ jobs:
path: /tmp/linux-amd64-image.tar
key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }}
env:
cache-name: cache-linux-amd64-image
cache-name: cache-${{ github.ref }}
os: linux-amd64
-
if: ${{ steps.cache-linux-amd64-restore.outputs.cache-hit != 'true' }}
Expand All @@ -510,7 +510,7 @@ jobs:
id: cache-linux-amd64-image-save
uses: actions/cache/save@v3
env:
cache-name: cache-linux-amd64-image
cache-name: cache-${{ github.ref }}
with:
path: /tmp/linux-amd64-image.tar
key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }}
Expand Down Expand Up @@ -545,7 +545,7 @@ jobs:
id: cache-linux-amd64-image
uses: actions/cache/restore@v3
env:
cache-name: cache-linux-amd64-image
cache-name: cache-${{ github.ref }}
with:
path: /tmp/linux-amd64-image.tar
key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }}
Expand Down Expand Up @@ -599,7 +599,7 @@ jobs:
path: /tmp/linux-arm64-image.tar
key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }}
env:
cache-name: cache-linux-arm64-image
cache-name: cache-${{ github.ref }}
os: linux-arm64
-
if: ${{ steps.cache-linux-arm64-restore.outputs.cache-hit != 'true' }}
Expand All @@ -621,7 +621,7 @@ jobs:
id: cache-linux-arm64-image-save
uses: actions/cache/save@v3
env:
cache-name: cache-linux-arm64-image
cache-name: cache-${{ github.ref }}
with:
path: /tmp/linux-arm64-image.tar
key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }}
Expand Down Expand Up @@ -666,7 +666,7 @@ jobs:
id: cache-linux-arm64-image
uses: actions/cache/restore@v3
env:
cache-name: cache-linux-arm64-image
cache-name: cache-${{ github.ref }}
with:
path: /tmp/linux-arm64-image.tar
key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }}
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
id: cache-docker-image-restore
uses: actions/cache/restore@v3
env:
cache-name: cache-docker-image
cache-name: cache-${{ github.ref }}
with:
path: /tmp/build-image.tar
key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('build/package/Dockerfile') }}
Expand All @@ -62,7 +62,7 @@ jobs:
id: cache-docker-image-save
uses: actions/cache/save@v3
env:
cache-name: cache-docker-image
cache-name: cache-${{ github.ref }}
with:
path: /tmp/build-image.tar
key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('build/package/Dockerfile') }}
Expand All @@ -86,7 +86,7 @@ jobs:
id: cache-docker-image
uses: actions/cache/restore@v3
env:
cache-name: cache-docker-image
cache-name: cache-${{ github.ref }}
with:
path: /tmp/build-image.tar
key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }}
Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:
id: cache-docker-image
uses: actions/cache/restore@v3
env:
cache-name: cache-docker-image
cache-name: cache-${{ github.ref }}
with:
path: /tmp/build-image.tar
key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }}
Expand Down Expand Up @@ -196,7 +196,7 @@ jobs:
id: cache-docker-image
uses: actions/cache/restore@v3
env:
cache-name: cache-docker-image
cache-name: cache-${{ github.ref }}
with:
path: /tmp/build-image.tar
key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }}
Expand Down Expand Up @@ -247,7 +247,7 @@ jobs:
id: cache-docker-image
uses: actions/cache/restore@v3
env:
cache-name: cache-docker-image
cache-name: cache-${{ github.ref }}
with:
path: /tmp/build-image.tar
key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }}
Expand Down Expand Up @@ -285,7 +285,7 @@ jobs:
id: cache-docker-image
uses: actions/cache/restore@v3
env:
cache-name: cache-docker-image
cache-name: cache-${{ github.ref }}
with:
path: /tmp/build-image.tar
key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }}
Expand Down Expand Up @@ -333,7 +333,7 @@ jobs:
id: cache-docker-image
uses: actions/cache/restore@v3
env:
cache-name: cache-docker-image
cache-name: cache-${{ github.ref }}
with:
path: /tmp/build-image.tar
key: ${{ runner.os }}-docker-image-${{ env.cache-name }}-${{ hashFiles('/tmp/build-image.tar') }}
Expand Down Expand Up @@ -485,7 +485,7 @@ jobs:
path: /tmp/linux-amd64-image.tar
key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }}
env:
cache-name: cache-linux-amd64-image
cache-name: cache-${{ github.ref }}
os: linux-amd64
-
if: ${{ steps.cache-linux-amd64-restore.outputs.cache-hit != 'true' }}
Expand All @@ -507,7 +507,7 @@ jobs:
id: cache-linux-amd64-image-save
uses: actions/cache/save@v3
env:
cache-name: cache-linux-amd64-image
cache-name: cache-${{ github.ref }}
with:
path: /tmp/linux-amd64-image.tar
key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }}
Expand Down Expand Up @@ -542,7 +542,7 @@ jobs:
id: cache-linux-amd64-image
uses: actions/cache/restore@v3
env:
cache-name: cache-linux-amd64-image
cache-name: cache-${{ github.ref }}
with:
path: /tmp/linux-amd64-image.tar
key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }}
Expand Down Expand Up @@ -596,7 +596,7 @@ jobs:
path: /tmp/linux-arm64-image.tar
key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }}
env:
cache-name: cache-linux-arm64-image
cache-name: cache-${{ github.ref }}
os: linux-arm64
-
if: ${{ steps.cache-linux-arm64-restore.outputs.cache-hit != 'true' }}
Expand All @@ -618,7 +618,7 @@ jobs:
id: cache-linux-arm64-image-save
uses: actions/cache/save@v3
env:
cache-name: cache-linux-arm64-image
cache-name: cache-${{ github.ref }}
with:
path: /tmp/linux-arm64-image.tar
key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }}
Expand Down Expand Up @@ -663,7 +663,7 @@ jobs:
id: cache-linux-arm64-image
uses: actions/cache/restore@v3
env:
cache-name: cache-linux-arm64-image
cache-name: cache-${{ github.ref }}
with:
path: /tmp/linux-arm64-image.tar
key: ${{ env.cache-name }}-${{ hashFiles('test/docker/Dockerfile') }}
Expand Down

0 comments on commit 3c830a6

Please sign in to comment.