ci(actions-caches): add daily cleaner for closed-PR pre-commit caches#7034
Merged
ci(actions-caches): add daily cleaner for closed-PR pre-commit caches#7034
Conversation
|
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
mitsudome-r
approved these changes
Apr 20, 2026
GitHub Actions caches keyed to closed/merged PRs linger up to 7 days under the default LRU. Add a small daily workflow that lists pre-commit caches and deletes any whose attached PR is no longer open. Signed-off-by: Mete Fatih Cırıt <[email protected]>
8642f79 to
1246910
Compare
10 tasks
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


pre-commit*Actions caches and deletes any whose attached PR is no longer open.schedule: 30 5 * * *(05:30 UTC) and onworkflow_dispatch. Logs each cache decision and writes a markdown summary to$GITHUB_STEP_SUMMARY.Why
GitHub's default cache LRU only evicts after 7 days of no access, so caches keyed to closed/merged PRs sit around uselessly. Today they are small (~430 MiB across 10 entries), but the cost is zero to keep them tidy and it scales as PR throughput grows.
Test plan
Manually dispatch the workflow from the Actions tab and confirm it completes green.
Inspect the run's Summary for the
🧹 Pre-commit cache cleanuptable (scanned / deleted / remaining counts).Expand the
🗂️ Inspecting per-PR stategroup and confirm OPEN PRs are marked⏭️ keepand CLOSED/MERGED ones🗑️ delete.After the run, verify deletions locally:
Confirm no entries remain whose
refmatches a closed PR.