mirror of
https://github.com/actions/cache.git
synced 2024-11-14 01:51:46 +01:00
Merge branch 'main' into correct-readme-re-windows
This commit is contained in:
commit
3337563725
2 changed files with 2 additions and 2 deletions
|
@ -120,7 +120,7 @@ steps:
|
||||||
|
|
||||||
#### Reusing primary key and restored key in the save action
|
#### Reusing primary key and restored key in the save action
|
||||||
|
|
||||||
Usually you may want to use same `key` in both actions/cache/restore` and `actions/cache/save` action. To achieve this, use `outputs` from the restore action to reuse the same primary key (or the key of the cache that was restored).
|
Usually you may want to use same `key` in both `actions/cache/restore` and `actions/cache/save` action. To achieve this, use `outputs` from the restore action to reuse the same primary key (or the key of the cache that was restored).
|
||||||
|
|
||||||
#### Using restore action outputs to make save action behave just like the cache action
|
#### Using restore action outputs to make save action behave just like the cache action
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ Case 1: Where an user would want to reuse the key as it is
|
||||||
```yaml
|
```yaml
|
||||||
uses: actions/cache/save@v3
|
uses: actions/cache/save@v3
|
||||||
with:
|
with:
|
||||||
key: steps.restore-cache.output.key
|
key: ${{ steps.restore-cache.outputs.key }}
|
||||||
```
|
```
|
||||||
|
|
||||||
Case 2: Where the user would want to re-evaluate the key
|
Case 2: Where the user would want to re-evaluate the key
|
||||||
|
|
Loading…
Reference in a new issue