Skip to content

Commit 3543324

Browse files
authored
Merge pull request #434 from DanielHabenicht/patch-1
Update examples.md for NPM
2 parents 3303695 + 19530ba commit 3543324

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎examples.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,13 @@ If using `npm config` to retrieve the cache directory, ensure you run [actions/s
195195

196196
```yaml
197197
- name: Get npm cache directory
198-
id: npm-cache
198+
id: npm-cache-dir
199199
run: |
200200
echo "::set-output name=dir::$(npm config get cache)"
201201
- uses: actions/cache@v2
202+
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
202203
with:
203-
path: ${{ steps.npm-cache.outputs.dir }}
204+
path: ${{ steps.npm-cache-dir.outputs.dir }}
204205
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
205206
restore-keys: |
206207
${{ runner.os }}-node-

0 commit comments

Comments
 (0)