@@ -19,18 +19,17 @@ jobs:
19
19
uses : actions/setup-node@v2
20
20
with :
21
21
node-version : 12
22
+ - name : Get yarn cache directory path
23
+ id : yarn-cache-dir-path
24
+ run : echo "::set-output name=dir::$(yarn cache dir)"
22
25
- name : Cache node modules
23
26
uses : actions/cache@v2
24
- env :
25
- cache-name : cache-node-modules
27
+ id : yarn-cache
26
28
with :
27
- # npm cache files are stored in `~/.npm` on Linux/macOS
28
- path : ~/.npm
29
- key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
29
+ path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
30
+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
30
31
restore-keys : |
31
- ${{ runner.os }}-build-${{ env.cache-name }}-
32
- ${{ runner.os }}-build-
33
- ${{ runner.os }}-
32
+ ${{ runner.os }}-yarn-
34
33
- name : Install dependencies
35
34
env :
36
35
CI : true
@@ -49,18 +48,17 @@ jobs:
49
48
- uses : actions/setup-node@v2
50
49
with :
51
50
node-version : 12
51
+ - name : Get yarn cache directory path
52
+ id : yarn-cache-dir-path
53
+ run : echo "::set-output name=dir::$(yarn cache dir)"
52
54
- name : Cache node modules
53
55
uses : actions/cache@v2
54
- env :
55
- cache-name : cache-node-modules
56
+ id : yarn-cache
56
57
with :
57
- # npm cache files are stored in `~/.npm` on Linux/macOS
58
- path : ~/.npm
59
- key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
58
+ path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
59
+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
60
60
restore-keys : |
61
- ${{ runner.os }}-build-${{ env.cache-name }}-
62
- ${{ runner.os }}-build-
63
- ${{ runner.os }}-
61
+ ${{ runner.os }}-yarn-
64
62
- env :
65
63
CI : true
66
64
run : |
0 commit comments