Skip to content

Commit 2a88642

Browse files
committed
use setup-node cache in other workflows as well
1 parent b02f0a0 commit 2a88642

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

.github/workflows/nodejs.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,9 @@ jobs:
2626
uses: actions/setup-node@v3
2727
with:
2828
node-version: ${{ matrix.node-version }}
29+
cache: 'npm'
2930

30-
- name: Use cached node_modules
31-
id: cache
32-
uses: actions/cache@v3
33-
with:
34-
path: node_modules
35-
key: nodeModules-${{ hashFiles('./package-lock.json') }}-${{ matrix.node-version }}
36-
restore-keys: |
37-
nodeModules-
3831
- name: Install dependencies
39-
if: steps.cache.outputs.cache-hit != 'true'
4032
run: npm install
4133
env:
4234
CI: true

.github/workflows/release.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,9 @@ jobs:
2323
with:
2424
node-version: ${{ matrix.node-version }}
2525
registry-url: 'https://registry.npmjs.org'
26-
27-
- name: Use cached node_modules
28-
id: cache
29-
uses: actions/cache@v3
30-
with:
31-
path: node_modules
32-
key: nodeModules-${{ hashFiles('**/package-lock.json') }}-${{ matrix.node-version }}
33-
restore-keys: |
34-
nodeModules-
26+
cache: 'npm'
3527

3628
- name: Install dependencies
37-
if: steps.cache.outputs.cache-hit != 'true'
3829
run: npm install
3930
env:
4031
CI: true

0 commit comments

Comments
 (0)