From 3c830a6773dbb697b13beb86d078072a22f57bf8 Mon Sep 17 00:00:00 2001 From: tdstein Date: Wed, 13 Sep 2023 11:38:55 -0400 Subject: [PATCH] Modifies caching strategy --- .github/workflows/main.yaml | 28 ++++++++++++++-------------- .github/workflows/pull-request.yaml | 28 ++++++++++++++-------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 849ad7736..ff02d5c8b 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -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') }} @@ -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') }} @@ -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') }} @@ -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') }} @@ -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') }} @@ -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') }} @@ -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') }} @@ -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') }} @@ -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' }} @@ -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') }} @@ -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') }} @@ -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' }} @@ -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') }} @@ -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') }} diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index 3d1f4e534..c2a3da1fb 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -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') }} @@ -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') }} @@ -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') }} @@ -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') }} @@ -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') }} @@ -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') }} @@ -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') }} @@ -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') }} @@ -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' }} @@ -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') }} @@ -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') }} @@ -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' }} @@ -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') }} @@ -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') }}