mirror of
https://github.com/actions/cache.git
synced 2026-07-04 11:25:49 +00:00
Compare commits
5 Commits
adb40f9e9a
...
3514c74aa3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3514c74aa3 | ||
|
|
81382a721f | ||
|
|
c4ee99a3bd | ||
|
|
bf9a7572fe | ||
|
|
104f95683b |
@ -204,7 +204,7 @@ If you want to avoid re-computing the cache key again in `save` action, the outp
|
|||||||
.
|
.
|
||||||
.
|
.
|
||||||
.
|
.
|
||||||
- uses: actions/cache/save@v3
|
- uses: actions/cache/save@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
path/to/dependencies
|
path/to/dependencies
|
||||||
@ -228,7 +228,7 @@ with:
|
|||||||
Case 1: Where an user would want to reuse the key as it is
|
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@v4
|
||||||
with:
|
with:
|
||||||
key: ${{ steps.restore-cache.outputs.cache-primary-key }}
|
key: ${{ steps.restore-cache.outputs.cache-primary-key }}
|
||||||
```
|
```
|
||||||
@ -236,7 +236,7 @@ with:
|
|||||||
Case 2: Where the user would want to re-evaluate the key
|
Case 2: Where the user would want to re-evaluate the key
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
uses: actions/cache/save@v3
|
uses: actions/cache/save@v4
|
||||||
with:
|
with:
|
||||||
key: npm-cache-${{hashfiles(package-lock.json)}}
|
key: npm-cache-${{hashfiles(package-lock.json)}}
|
||||||
```
|
```
|
||||||
@ -255,7 +255,7 @@ steps:
|
|||||||
.
|
.
|
||||||
- name: Build
|
- name: Build
|
||||||
run: /build.sh
|
run: /build.sh
|
||||||
- uses: actions/cache/save@v3
|
- uses: actions/cache/save@v4
|
||||||
if: always() // or any other condition to invoke the save action
|
if: always() // or any other condition to invoke the save action
|
||||||
with:
|
with:
|
||||||
path: path/to/dependencies
|
path: path/to/dependencies
|
||||||
@ -275,7 +275,7 @@ steps:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: ./build-parent-module.sh
|
run: ./build-parent-module.sh
|
||||||
|
|
||||||
- uses: actions/cache/save@v3
|
- uses: actions/cache/save@v4
|
||||||
id: cache
|
id: cache
|
||||||
with:
|
with:
|
||||||
path: path/to/dependencies
|
path: path/to/dependencies
|
||||||
|
|||||||
@ -69,7 +69,7 @@ steps:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: /build-parent-module.sh
|
run: /build-parent-module.sh
|
||||||
|
|
||||||
- uses: actions/cache/save@v3
|
- uses: actions/cache/save@v4
|
||||||
id: cache
|
id: cache
|
||||||
with:
|
with:
|
||||||
path: path/to/dependencies
|
path: path/to/dependencies
|
||||||
|
|||||||
@ -31,7 +31,7 @@ steps:
|
|||||||
- name: Build artifacts
|
- name: Build artifacts
|
||||||
run: /build.sh
|
run: /build.sh
|
||||||
|
|
||||||
- uses: actions/cache/save@v3
|
- uses: actions/cache/save@v4
|
||||||
id: cache
|
id: cache
|
||||||
with:
|
with:
|
||||||
path: path/to/dependencies
|
path: path/to/dependencies
|
||||||
@ -55,7 +55,7 @@ with:
|
|||||||
|
|
||||||
#### Case 1 - Where a user would want to reuse the key as it is
|
#### Case 1 - Where a user would want to reuse the key as it is
|
||||||
```yaml
|
```yaml
|
||||||
uses: actions/cache/save@v3
|
uses: actions/cache/save@v4
|
||||||
with:
|
with:
|
||||||
key: ${{ steps.restore-cache.outputs.cache-primary-key }}
|
key: ${{ steps.restore-cache.outputs.cache-primary-key }}
|
||||||
```
|
```
|
||||||
@ -63,7 +63,7 @@ with:
|
|||||||
#### Case 2 - Where the user would want to re-evaluate the key
|
#### Case 2 - Where the user would want to re-evaluate the key
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
uses: actions/cache/save@v3
|
uses: actions/cache/save@v4
|
||||||
with:
|
with:
|
||||||
key: npm-cache-${{hashfiles(package-lock.json)}}
|
key: npm-cache-${{hashfiles(package-lock.json)}}
|
||||||
```
|
```
|
||||||
@ -80,7 +80,7 @@ steps:
|
|||||||
.
|
.
|
||||||
- name: Build
|
- name: Build
|
||||||
run: /build.sh
|
run: /build.sh
|
||||||
- uses: actions/cache/save@v3
|
- uses: actions/cache/save@v4
|
||||||
if: always() // or any other condition to invoke the save action
|
if: always() // or any other condition to invoke the save action
|
||||||
with:
|
with:
|
||||||
path: path/to/dependencies
|
path: path/to/dependencies
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user