ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows (#1382)

This commit is contained in:
Oscar Dominguez 2021-10-13 17:01:39 +02:00 committed by GitHub
parent 02ebd3243b
commit 2723f00cb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 13 deletions

View File

@ -14,9 +14,10 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: setup node
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: "12.x"
cache: npm
- name: npm install, generate readme
run: |

View File

@ -16,20 +16,10 @@ jobs:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: "12.x"
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key:
${{ runner.os }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-cache-
cache: npm
- name: Install & Test
run: |