Repository navigation
ci: clean up PR caches on close and shorten artifact retention - #185
sergeyfarin wants to merge 1 commit into
Conversation
A closed pull request's caches can only be restored by that pull request, so delete them when it closes instead of letting them hold the repository cache quota for up to 7 days. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of
|
Summary
Stops PR caches and CI artifacts from piling up in Actions storage. A storage audit on 2026-12-05 found one closed PR's Rust cache taking 443 MB and 172
vitest-coverageartifacts (282 MB) going back to September, all kept for the 90-day default..github/workflows/cleanup-pr-caches.yml: when a pull request closes (merged or not), it deletes the caches saved underrefs/pull/N/mergeand under the head branch. Only that pull request can restore them, so until now they sat in the 10 GB repository cache quota for up to 7 days and pushed out the default branch's caches. It never touches the default branch's caches, skips pull requests from forks (read-only token), and only warns when a deletion is refused (for example a Dependabot pull request that Dependabot closes itself).pr-tests.yml: the Rust dependency cache becomes restore-only (save-if: false).publish-dist.ymlalready saves the sharedressim-benchmark-cachekey frommaster, and pull requests restore that copy.retention-days: 7onvitest-coverage,pr-browser-smoke-diagnosticsandpages-smoke-diagnostics, which had no retention set (90-day default). The dist bundle keeps its 14 days.Testing
bash -n.🤖 Generated with Claude Code