Skip to content

Commit 017c2db

Browse files
committed
fix cache [workflow actions]
1 parent cfb7c56 commit 017c2db

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

.github/workflows/build.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ jobs:
2828
node-version: ${{ matrix.node-version }}
2929

3030
- name: Use cached node_modules
31-
id: cache
31+
id: cache-build
3232
uses: actions/cache@v2
3333
with:
3434
path: node_modules
35-
key: nodeModules-${{ hashFiles('**/package-lock.json') }}-${{ matrix.node-version }}
35+
key: nodeModules-${{ hashFiles('**/package-lock.json') }}-${{ matrix.node-version }}-build
3636
restore-keys: |
3737
nodeModules-
3838
- name: Install dependencies
39-
if: steps.cache.outputs.cache-hit != 'true'
39+
if: steps.cache-build.outputs.cache-hit != 'true'
4040
run: npm install
4141
env:
4242
CI: true

.github/workflows/publish.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ jobs:
2424
scope: '@mertasan'
2525

2626
- name: Use cached node_modules
27-
id: cache
27+
id: cache-publish
2828
uses: actions/cache@v2
2929
with:
3030
path: node_modules
31-
key: nodeModules-${{ hashFiles('**/package-lock.json') }}-${{ matrix.node-version }}
31+
key: nodeModules-${{ hashFiles('**/package-lock.json') }}-${{ matrix.node-version }}-publish
3232
restore-keys: |
3333
nodeModules-
3434
- name: Install dependencies
35-
if: steps.cache.outputs.cache-hit != 'true'
35+
if: steps.cache-publish.outputs.cache-hit != 'true'
3636
run: npm install
3737
env:
3838
CI: true

.github/workflows/tests.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ on:
1414
jobs:
1515
build:
1616
runs-on: ubuntu-latest
17-
1817
strategy:
1918
matrix:
2019
node-version: [12, 14, 16]
@@ -28,16 +27,16 @@ jobs:
2827
node-version: ${{ matrix.node-version }}
2928

3029
- name: Use cached node_modules
31-
id: cache
30+
id: cache-tests
3231
uses: actions/cache@v2
3332
with:
3433
path: node_modules
35-
key: nodeModules-${{ hashFiles('**/package-lock.json') }}-${{ matrix.node-version }}
34+
key: nodeModules-${{ hashFiles('**/package-lock.json') }}-${{ matrix.node-version }}-tests
3635
restore-keys: |
3736
nodeModules-
3837
3938
- name: Install dependencies
40-
if: steps.cache.outputs.cache-hit != 'true'
39+
if: steps.cache-tests.outputs.cache-hit != 'true'
4140
run: npm install
4241
env:
4342
CI: true

0 commit comments

Comments
 (0)