Compare commits

..

5 Commits

Author SHA1 Message Date
Oleg A.
3514c74aa3
Merge c3ca3a1a67 into 81382a721f 2024-08-14 10:27:11 -07:00
Bassem Dghaidi
81382a721f
Merge pull request #1311 from todgru/todgru/v4-documentation-update
docs: update examples to v4
2024-08-14 12:13:33 +02:00
Bassem Dghaidi
c4ee99a3bd
Merge branch 'main' into todgru/v4-documentation-update 2024-08-14 12:09:56 +02:00
todgru
bf9a7572fe
Merge branch 'main' into todgru/v4-documentation-update 2024-04-24 07:24:11 -07:00
todgru
104f95683b update documentation to use <action>@v4 2024-01-26 14:08:22 -08:00
3 changed files with 10 additions and 10 deletions

View File

@ -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

View File

@ -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

View File

@ -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