From cb74cb21eddf1625b6d3ade3994bf1bcfd22cbef Mon Sep 17 00:00:00 2001 From: Tilman Vatteroth Date: Sun, 6 Nov 2022 17:58:09 +0100 Subject: [PATCH] fix: prefer pull request head sha for e2e build cache key Signed-off-by: Tilman Vatteroth --- .github/workflows/e2e.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index ff0b45b2f..a3e418bbc 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -15,6 +15,7 @@ permissions: env: NODE_VERSION: 18 + BUILD_CACHE_KEY: "${{ !!github.event.pull_request && github.event.pull_request.head.sha || github.sha }}" jobs: build-frontend: @@ -29,7 +30,7 @@ jobs: id: build-cache with: path: .next - key: build-${{ github.sha }} + key: ${{ env.BUILD_CACHE_KEY }} - name: Get yarn cache directory path id: yarn-cache-dir-path @@ -88,7 +89,7 @@ jobs: id: build-cache with: path: .next - key: build-${{ github.sha }} + key: ${{ env.BUILD_CACHE_KEY }} - name: Get yarn cache directory path id: yarn-cache-dir-path