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.
This action has never worked due to permission issues, and because of how GitHub handles caches it wouldn't reliably help cache anyway.
Adding the required token management to allow the workflow to delete the caches would require ensuring it isn't abused, and even without malicious attempts to attach the repo using permissions it opens up the risk for issues from incorrectly written CI code.
Most PRs won't have any cache entries anyway, as cache entries generally don't survive beyond 24 hours, unless they need to be rebased etc. just ahead of merging. And because GitHub deletes the oldest cache entries first, not the least recently used there's a fairly even chance deleting the cache entries of any one PR hurts the retention of the
mastercache rather than helping, if the cache of that PR is older than themasterbranch. Finally any PR that deletes their caches on merge will invariably hurt cache retention as their caches will always be older than the new currentmaster. (Effectively we want to have old cache entries as a "buffer", as we cannot ever really guarantee that the cache is small enough, given that a single build ofmastertakes several GB alone, and most PRs take at least a few dozen MB unless they are absolutely minimal)As discussed elsewhere we will hopefully be able to migrate away from using GitHub's cache system in favor of using artifacts and similar, so we could remove this then, but this workflow just takes up space and generates noise even though it probably doesn't significantly affect the availability of runners as it is so fast.