Skip to content

Commit

Permalink
Merge pull request #434 from DanielHabenicht/patch-1
Browse files Browse the repository at this point in the history
Update examples.md for NPM
  • Loading branch information
Konrad Pabjan authored and GitHub committed Jan 14, 2021
2 parents 3303695 + 19530ba commit 3543324
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,13 @@ If using `npm config` to retrieve the cache directory, ensure you run [actions/s

```yaml
- name: Get npm cache directory
id: npm-cache
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
with:
path: ${{ steps.npm-cache.outputs.dir }}
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
Expand Down

0 comments on commit 3543324

Please sign in to comment.