-
-
Notifications
You must be signed in to change notification settings - Fork 603
Description
I think we should improve the way we manage our GitHub Actions cache limits by adding an automated workflow that deletes runner caches scoped to a pull request when it is closed or merged.
Currently, our CI uses GitHub Actions caching extensively (saving cargo registries, index, and build artifacts) to speed up our tests. However, we do not have an automated way to clean up orphaned caches once a PR is closed or merged. Without cleanup, these orphaned caches can accumulate and quickly consume the repository's 10 GB cache storage limit, causing cache eviction churn and slowing down active PRs.
We could implement this by adding a small .github/workflows/cleanup-caches.yml workflow that triggers on pull_request: [closed] and uses the gh actions-cache delete CLI extension or a community action to clear up space when it's no longer needed.