gh-cache-list1
List github actions caches
Usage
gh cache
list
[flags]
Options
-
-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
|
Maximum number of caches to fetch |
|---|---|
|
Order of caches returned: {asc|desc} |
-
-r, --ref <string> -
Filter by ref, formatted as refs/heads/ or refs/pull//merge
-S,--sort<string> (default "last_accessed_at")-
Sort fetched caches: {created_at|last_accessed_at|size_in_bytes}
-
-t, --template <string> -
Format JSON output using a Go template; see "gh help formatting"
Options inherited from parent commands
-R,--repo<[HOST/]OWNER/REPO>-
Select another repository using the [HOST/]OWNER/REPO format
Aliases
gh cache ls
Json fields
createdAt, id, key, lastAccessedAt, ref, sizeInBytes, version
Exit status
0: Successful execution
1: Error
2: Command canceled
4: Authentication required
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
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 # List caches for a specific branch, replace <branch-name> with the actual branch name $ gh cache list --ref refs/heads/<branch-name> # 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
Releases
2 releases since Debian 13 (Trixie); the text changed 1 time.