mirror of
https://github.com/actions/cache.git
synced 2025-04-01 19:06:35 +00:00
Code review
This commit is contained in:
parent
bb5b1c3db4
commit
ff0920f62d
4 changed files with 5 additions and 4 deletions
|
@ -45,6 +45,7 @@ If you are using this inside a container, a POSIX-compliant `tar` needs to be in
|
|||
* `key` - An explicit key for restoring and saving the cache
|
||||
* `restore-keys` - An ordered list of prefix-matched keys to use for restoring stale cache if no cache hit occurred for key.
|
||||
* `enableCrossOsArchive` - An optional boolean when enabled, allows Windows runners to save or restore caches that can be restored or saved respectively on other platforms. Default: false
|
||||
* `fail-on-cache-miss` - Fail the workflow if cache entry is not found
|
||||
|
||||
#### Environment Variables
|
||||
* `SEGMENT_DOWNLOAD_TIMEOUT_MINS` - Segment download timeout (in minutes, default `60`) to abort download of the segment if not completed in the defined number of minutes. [Read more](https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cache-segment-restore-timeout)
|
||||
|
|
|
@ -19,7 +19,7 @@ inputs:
|
|||
default: 'false'
|
||||
required: false
|
||||
fail-on-cache-miss:
|
||||
description: 'Fail the workflow if no cache entry is not found'
|
||||
description: 'Fail the workflow if cache entry is not found'
|
||||
default: 'false'
|
||||
required: false
|
||||
outputs:
|
||||
|
|
|
@ -7,7 +7,7 @@ The restore action, as the name suggest, restores a cache. It acts similar to th
|
|||
* `path` - A list of files, directories, and wildcard patterns to cache and restore. See [`@actions/glob`](https://github.com/actions/toolkit/tree/main/packages/glob) for supported patterns.
|
||||
* `key` - String used while saving cache for restoring the cache
|
||||
* `restore-keys` - An ordered list of prefix-matched keys to use for restoring stale cache if no cache hit occurred for key.
|
||||
* `fail-on-cache-miss` - Fail the workflow if no cache entry is not found
|
||||
* `fail-on-cache-miss` - Fail the workflow if cache entry is not found
|
||||
|
||||
## Outputs
|
||||
|
||||
|
@ -96,7 +96,7 @@ steps:
|
|||
|
||||
### Exit workflow on cache miss
|
||||
|
||||
You can use `fail-on-cache-miss: true` to exit the workflow on a cache miss. This way you can restrict your workflow to only initiate the build when a cache with the exact key is found. Make sure to leave `restore-keys` empty!
|
||||
You can use `fail-on-cache-miss: true` to exit the workflow on a cache miss. This way you can restrict your workflow to only initiate the build when a cache is matched. Also, if you want to fail if cache did not match primary key, additionally leave `restore-keys` empty!
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
|
|
|
@ -16,7 +16,7 @@ inputs:
|
|||
default: 'false'
|
||||
required: false
|
||||
fail-on-cache-miss:
|
||||
description: 'Fail the workflow if no cache entry is not found'
|
||||
description: 'Fail the workflow if cache entry is not found'
|
||||
default: 'false'
|
||||
required: false
|
||||
outputs:
|
||||
|
|
Loading…
Add table
Reference in a new issue