Skip to content

Commit 4ada04d

Browse files
fix: bump pnpm cache version to invalidate corrupted cache
The CI was restoring an old pnpm store cache that was created with the corrupted lockfile. By bumping the cache key from v1 (implicit) to v2, we ensure CI will create a fresh cache with the fixed lockfile. This resolves the ERR_PNPM_BROKEN_LOCKFILE error that persisted after the lockfile was regenerated. Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
1 parent d7f8d60 commit 4ada04d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ jobs:
6868
uses: actions/cache@v5
6969
with:
7070
path: ${{ env.STORE_PATH }}
71-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
71+
key: ${{ runner.os }}-pnpm-store-v2-${{ hashFiles('**/pnpm-lock.yaml') }}
7272
restore-keys: |
73-
${{ runner.os }}-pnpm-store-
73+
${{ runner.os }}-pnpm-store-v2-
7474
7575
- name: Install dependencies
7676
run: pnpm install --frozen-lockfile
@@ -117,9 +117,9 @@ jobs:
117117
uses: actions/cache@v5
118118
with:
119119
path: ${{ env.STORE_PATH }}
120-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
120+
key: ${{ runner.os }}-pnpm-store-v2-${{ hashFiles('**/pnpm-lock.yaml') }}
121121
restore-keys: |
122-
${{ runner.os }}-pnpm-store-
122+
${{ runner.os }}-pnpm-store-v2-
123123
124124
- name: Install dependencies
125125
run: pnpm install --frozen-lockfile
@@ -180,9 +180,9 @@ jobs:
180180
uses: actions/cache@v5
181181
with:
182182
path: ${{ env.STORE_PATH }}
183-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
183+
key: ${{ runner.os }}-pnpm-store-v2-${{ hashFiles('**/pnpm-lock.yaml') }}
184184
restore-keys: |
185-
${{ runner.os }}-pnpm-store-
185+
${{ runner.os }}-pnpm-store-v2-
186186
187187
- name: Setup Next.js cache
188188
uses: actions/cache@v5

0 commit comments

Comments
 (0)