Commit 95af7fc
authored
ci: prune pnpm store before caching and purge PR caches on close (#5340)
The pnpm store cache saved by actions/setup-node's cache: 'pnpm' only ever
grows: cache keys are immutable, so every lockfile change saves a brand-new
store on top of the previous one and pnpm never drops old package versions
from it on its own. Two fixes:
- node-setup: run `pnpm store prune` after install, so each saved cache
entry only contains what the current lockfile references instead of
every version ever fetched.
- cleanup-caches.yml: delete a PR's caches when it closes/merges, following
GitHub's documented pattern (docs.github.com/actions/.../caching-dependencies-to-speed-up-workflows).
PR-branch caches are scoped to a ref that stops being used once the PR is
gone, but GitHub never deletes them automatically, so they sit consuming
the repo's 10GB quota until LRU eviction forces them out - which stalls
the *next* cache save while eviction runs.
One-time cleanup: manually purged all 73 existing cache entries (10.72GB,
already over quota) via `gh cache delete` so both fixes start from a clean
slate.1 parent 02d88e6 commit 95af7fc
2 files changed
Lines changed: 47 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
0 commit comments