Skip to content

Commit 3f82e8e

Browse files
committed
fix: use consistent SHA for playwright build cache key
Use github.event.pull_request.head.sha for PRs to ensure cache key matches between playwright-build and playwright jobs. The github.sha variable returns the merge commit SHA for PRs which differs between jobs.
1 parent b5a74cc commit 3f82e8e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
playground/dist
112112
node_modules
113113
packages/*/node_modules
114-
key: playwright-build-${{ github.sha }}
114+
key: playwright-build-${{ github.event.pull_request.head.sha || github.sha }}
115115

116116
playwright:
117117
name: "Playwright Tests - ${{ matrix.browser }} (${{ matrix.shardIndex }}/${{ matrix.shardTotal }})"
@@ -148,7 +148,7 @@ jobs:
148148
playground/dist
149149
node_modules
150150
packages/*/node_modules
151-
key: playwright-build-${{ github.sha }}
151+
key: playwright-build-${{ github.event.pull_request.head.sha || github.sha }}
152152
fail-on-cache-miss: true
153153

154154
- name: Run server and Playwright tests

0 commit comments

Comments
 (0)