Skip to content

Commit ec20150

Browse files
authored
[ci] Stop using restore-keys for package manager stores (#87209)
1 parent f754a00 commit ec20150

File tree

4 files changed

+8
-15
lines changed

4 files changed

+8
-15
lines changed

.github/workflows/build_and_deploy.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,8 @@ jobs:
108108
id: cache-pnpm-store
109109
with:
110110
path: ${{ steps.get-store-path.outputs.STORE_PATH }}
111-
key: pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
112-
restore-keys: |
113-
pnpm-store-
114-
pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
111+
key: pnpm-store-v2-${{ hashFiles('pnpm-lock.yaml') }}
112+
# Do not use restore-keys since it leads to indefinite growth of the cache.
115113

116114
- run: pnpm install
117115

.github/workflows/create_release_branch.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,8 @@ jobs:
6565
id: cache-pnpm-store
6666
with:
6767
path: ${{ steps.get-store-path.outputs.STORE_PATH }}
68-
key: pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
69-
restore-keys: |
70-
pnpm-store-
71-
pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
68+
key: pnpm-store-v2-${{ hashFiles('pnpm-lock.yaml') }}
69+
# Do not use restore-keys since it leads to indefinite growth of the cache.
7270

7371
- run: pnpm install
7472

.github/workflows/release-next-rspack.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,8 @@ jobs:
7979
uses: actions/cache@v3
8080
with:
8181
path: ~/.pnpm-store
82-
key: ${{ runner.os }}-${{ runner.arch }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
83-
restore-keys: |
84-
${{ runner.os }}-${{ runner.arch }}-pnpm-
82+
key: ${{ runner.os }}-${{ runner.arch }}-pnpm-v2-${{ hashFiles('**/pnpm-lock.yaml') }}
83+
# Do not use restore-keys since it leads to indefinite growth of the cache.
8584

8685
- name: Install dependencies
8786
run: pnpm install

.github/workflows/trigger_release.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,8 @@ jobs:
9797
id: cache-pnpm-store
9898
with:
9999
path: ${{ steps.get-store-path.outputs.STORE_PATH }}
100-
key: pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
101-
restore-keys: |
102-
pnpm-store-
103-
pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
100+
key: pnpm-store-v2-${{ hashFiles('pnpm-lock.yaml') }}
101+
# Do not use restore-keys since it leads to indefinite growth of the cache.
104102

105103
- run: pnpm install
106104

0 commit comments

Comments
 (0)