mirror of
https://code.forgejo.org/actions/cache.git
synced 2026-03-05 15:15:59 +03:00
docs: Update examples to cache@v5
This commit is contained in:
parent
9255dc7a25
commit
de99935c0c
6 changed files with 84 additions and 84 deletions
|
|
@ -12,7 +12,7 @@ A cache today is immutable and cannot be updated. But some use cases require the
|
|||
|
||||
```yaml
|
||||
- name: update cache on every commit
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: prime-numbers
|
||||
key: primes-${{ runner.os }}-${{ github.run_id }} # Can use time based key as well
|
||||
|
|
@ -21,7 +21,7 @@ A cache today is immutable and cannot be updated. But some use cases require the
|
|||
```
|
||||
|
||||
Please note that this will create a new cache on every run and hence will consume the cache [quota](./README.md#cache-limits).
|
||||
|
||||
|
||||
## Use cache across feature branches
|
||||
|
||||
Reusing cache across feature branches is not allowed today to provide cache [isolation](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache). However if both feature branches are from the default branch, a good way to achieve this is to ensure that the default branch has a cache. This cache will then be consumable by both feature branches.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue