2024-03-05 gh cache list コマンドに key, ref オプションを追加した
`gh cache list` コマンドに ref オプションも足したぞい! » Release GitHub CLI 2.45.0 · cli/cli https://t.co/4mtappf4UP https://t.co/lcJJw0AvjF
— toshimaru (@toshimaru_e) March 5, 2024
詳しい使い方は gh cache list --help
をみてくれ!
$ gh cache list --help
List Github Actions caches
For more information about output formatting flags, see `gh help formatting`.
USAGE
gh cache list [flags]
ALIASES
ls
FLAGS
-q, --jq expression Filter JSON output using a jq expression
--json fields Output JSON with the specified fields
-k, --key string Filter by cache key prefix
-L, --limit int Maximum number of caches to fetch (default 30)
-O, --order string Order of caches returned: {asc|desc} (default "desc")
-r, --ref string Filter by ref, formatted as refs/heads/<branch name> or refs/pull/<number>/merge
-S, --sort string Sort fetched caches: {created_at|last_accessed_at|size_in_bytes} (default "last_accessed_at")
-t, --template string Format JSON output using a Go template; see "gh help formatting"
INHERITED FLAGS
--help Show help for command
-R, --repo [HOST/]OWNER/REPO Select another repository using the [HOST/]OWNER/REPO format
EXAMPLES
# List caches for current repository
$ gh cache list
# List caches for specific repository
$ gh cache list --repo cli/cli
# List caches sorted by least recently accessed
$ gh cache list --sort last_accessed_at --order asc
# List caches that have keys matching a prefix (or that match exactly)
$ gh cache list --key key-prefix
# To list caches for a specific branch, replace <branch-name> with the actual branch name
$ gh cache list --ref refs/heads/<branch-name>
# To list caches for a specific pull request, replace <pr-number> with the actual pull request number
$ gh cache list --ref refs/pull/<pr-number>/merge