Only fail if no cache entry is found

This commit is contained in:
Marc Mueller 2023-01-09 16:03:44 +01:00
parent d05f7e6483
commit 155f8e7a3c
7 changed files with 13 additions and 21 deletions

View file

@ -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 the cache is not found for the primary key or no cache is found at all
* `fail-on-cache-miss` - Fail the workflow if no 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.
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!
```yaml
steps:

View file

@ -16,7 +16,7 @@ inputs:
default: 'false'
required: false
fail-on-cache-miss:
description: 'Fail the workflow if the cache is not found for the primary key or no cache is found at all'
description: 'Fail the workflow if no cache entry is not found'
default: 'false'
required: false
outputs: