Update doc

This commit is contained in:
Robert Haschke 2022-10-22 13:45:28 +02:00
parent 2cc80e8d36
commit 8b057be73f

View file

@ -40,6 +40,8 @@ If you are using this inside a container, a POSIX-compliant `tar` needs to be in
#### 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](#cache-segment-restore-timeout)
* `GHA_CACHE_SAVE` - Controls when to save cache. By default, a new cache is created if the job completes successfully. If this variable is set to `always`, the cache is saved also on job failure. If set to `never`, the cache is never saved, i.e. realizing read-only cache.
### Outputs
* `cache-hit` - A boolean value to indicate an exact match was found for the key
@ -80,7 +82,8 @@ jobs:
run: /primes.sh -d prime-numbers
```
> Note: You must use the `cache` action in your workflow before you need to use the files that might be restored from the cache. If the provided `key` matches an existing cache, a new cache is not created and if the provided `key` doesn't match an existing cache, a new cache is automatically created provided the job completes successfully.
> Note: You must use the `cache` action in your workflow _before_ you need to use the files that might be restored from the cache. If the provided `key` matches an existing cache exactly, a new cache is not created. Include `${{github.run_id}}` as the last component of your `key` to save the cache in each workflow run.
If the provided `key` doesn't match an existing cache exactly, a new cache is automatically created provided the job completes successfully. This behavior can be changed with the environment variable `GHA_CACHE_SAVE` ([see above](#environment-variables)).
## Implementation Examples