Skip to content

Commit e48be48

Browse files
committed
cache using package.json
We want to keep CI fast, but package-lock.json is not published, therefore we won't pull in newer dependencies when they change.
1 parent 6173119 commit e48be48

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/nodejs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ jobs:
3232
uses: actions/cache@v3
3333
with:
3434
path: node_modules
35-
key: nodeModules-${{ hashFiles('./package-lock.json') }}-${{ matrix.node-version }}
35+
key: nodeModules-${{ hashFiles('./package.json') }}-${{ matrix.node-version }}
3636
restore-keys: |
3737
nodeModules-
38+
3839
- name: Install dependencies
3940
if: steps.cache.outputs.cache-hit != 'true'
4041
run: npm install

.github/workflows/release-insiders.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
uses: actions/cache@v3
2727
with:
2828
path: node_modules
29-
key: nodeModules-${{ hashFiles('**/package-lock.json') }}-${{ matrix.node-version }}
29+
key: nodeModules-${{ hashFiles('**/package.json') }}-${{ matrix.node-version }}
3030
restore-keys: |
3131
nodeModules-
3232

0 commit comments

Comments
 (0)