Repository navigation
Add gh cache command or extension for Actions #7014
Description
Activity
in general we avoid bulk operation commands in favor of commands that can be scripted to perform bulk tasks.
does
ghcurrently give you the tools you need to enumerate a repository's caches so bulk deletion can be scripted?- addedmore-info-neededMore info needed from user/contributorMore info needed from user/contributorand removedneeds-triageneeds to be reviewedneeds to be reviewed
on Feb 16, 2023 does
ghcurrently give you the tools you need to enumerate a repository's caches so bulk deletion can be scripted?I don't know. But given that
gh api graphqlcan execute arbitrary queries, I'd guess there's a syntax that can accomplish what I want. But avoiding to learn qraphql to find out the proper query was the point for asking for this convenience command.- changed the title
[-]Add a command to bulk-delete all caches of a repository[/-][+]Add `gh cache` command for Actions [/+]on Feb 17, 2023 sure, that's what I was getting at. It sounds like we can turn this issue into a feature request for a new
gh cachecommand to go alongside ofgh runandgh workflow.I'm imagining something like:
gh cache list -R <repo> gh cache delete -R <repo> <integer ID or string key> gh cache delete -R <repo> --all(with -R being optional if
cwdis a local repository clone)I think a
--allis ok here even though we don't typically do bulk operations since "blast all caches for a repo" seems like a common use case.The bad news is that we are stretched thin and it'll be some time before it's even an option for us to prioritize this on the core team, so I'm marking this as help wanted / extension idea. I'm happy to talk more about UX if someone wants to pick it up.
In the short term @sschuberth I'd recommend learning how to do this with
gh api; I'm sorry for the unsatisfactory answer, there.Reacted by Sebastian Schuberth- addedhelp wantedContributions welcomeContributions welcomeextension-ideaAn idea that could make a good GitHub CLI extensionAn idea that could make a good GitHub CLI extensionand removedmore-info-neededMore info needed from user/contributorMore info needed from user/contributor
on Feb 17, 2023 - changed the title
[-]Add `gh cache` command for Actions [/-][+]Add `gh cache` command or extension for Actions [/+]on Feb 17, 2023
Describe the feature or problem you’d like to solve
I'm trying to get rid of bogus CI failures caused by action caches that erroneously were not evicted.
Proposed solution
Please add a command that allows build-deletion of all caches for a repository. The UI currently only allows to delete caches one-by-one, which is cumbersome if there are many of them.
Additional context
https://docs.github.com/en/rest/actions/cache