1
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2024-12-23 12:36:01 +01:00

Update Node Windows example to find the npm cache (#223)

This commit is contained in:
Dylan Musil 2020-03-18 22:05:56 -04:00 committed by GitHub
parent b13df3fa54
commit 22d71e33ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -140,10 +140,14 @@ For npm, cache files are stored in `~/.npm` on Posix, or `%AppData%/npm-cache` o
### Windows ### Windows
```yaml ```yaml
- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v1 - uses: actions/cache@v1
with: with:
path: ~\AppData\Roaming\npm-cache path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**\package-lock.json') }} key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: | restore-keys: |
${{ runner.os }}-node- ${{ runner.os }}-node-
``` ```