mirror of
https://code.forgejo.org/actions/cache.git
synced 2025-05-22 23:34:46 +00:00
Merge branch 'main' into restore-dry-run
This commit is contained in:
commit
b60c82ce6b
24 changed files with 205 additions and 68 deletions
|
@ -30,6 +30,7 @@ See ["Caching dependencies to speed up workflows"](https://docs.github.com/en/ac
|
|||
* Allowing users to provide a custom timeout as input for aborting download of a cache segment using an environment variable `SEGMENT_DOWNLOAD_TIMEOUT_MINS`. Default is 60 minutes.
|
||||
* Two new actions available for granular control over caches - [restore](restore/action.yml) and [save](save/action.yml)
|
||||
* Support cross-os caching as an opt-in feature. See [Cross OS caching](./tips-and-workarounds.md#cross-os-cache) for more info.
|
||||
* Added option to fail job on cache miss. See [Exit workflow on cache miss](./restore/README.md#exit-workflow-on-cache-miss) for more info.
|
||||
|
||||
Refer [here](https://github.com/actions/cache/blob/v2/README.md) for previous versions
|
||||
|
||||
|
@ -49,6 +50,7 @@ If you are using a `self-hosted` Windows runner, `GNU tar` and `zstd` are requir
|
|||
* `key` - An explicit key for restoring and saving the cache. Refer [creating a cache key](#creating-a-cache-key).
|
||||
* `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. Default: false
|
||||
* `lookup-only` - Skip downloading cache. Only check if cache entry exists. Default: false
|
||||
|
||||
#### Environment Variables
|
||||
|
@ -118,7 +120,7 @@ jobs:
|
|||
|
||||
- name: Restore cached Primes
|
||||
id: cache-primes-restore
|
||||
- uses: actions/cache/restore@v3
|
||||
uses: actions/cache/restore@v3
|
||||
with:
|
||||
path: |
|
||||
path/to/dependencies
|
||||
|
@ -129,7 +131,7 @@ jobs:
|
|||
.
|
||||
- name: Save Primes
|
||||
id: cache-primes-save
|
||||
- uses: actions/cache/save@v3
|
||||
uses: actions/cache/save@v3
|
||||
with:
|
||||
path: |
|
||||
path/to/dependencies
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue