Use correct GHA workflow syntax in new cache-clearing action, be more resilient #20756
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.
In #20755, I had a typo: formatting the jobs as a list, with
name
s keys... but that's the syntax for steps. Jobs need to be a dict with the ID as the key.This also squashes any errors from
rm -rf ....
: on Mac, it seems that attempts to delete directories that the runner doesn't have permission for (particularly system ones in~/Library/Caches
). But that's fine, we'll still delete all of the caches created by "day-to-day" actions runs, which are the big ones.(Why wasn't this caught in #20755? I attempted to run the workflow before merging, and got errors, but incorrectly assumed this was because the workflow didn't exist on
main
, but they were actually because it's invalid.)This has now successfully run and cleared hundreds of gigs over two runs:
rm
errors fix)