Visitar URL original
CI: use custom (better) Yarn cache strategy · adeira/universe@82d9052 · GitHub
Skip to content

Commit 82d9052

Browse files
mrtnzlmlkodiakhq[bot]
authored andcommitted
CI: use custom (better) Yarn cache strategy
See: actions/setup-node#325
1 parent 0b0089a commit 82d9052

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

‎.github/workflows/continuous-integration-javascript.yml‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,19 @@ jobs:
2929
uses: actions/setup-node@v3.4.1
3030
with:
3131
node-version: ${{ matrix.node-version }}
32-
cache: 'yarn'
32+
33+
- name: Get Yarn cache directory path
34+
id: yarn-cache-dir-path
35+
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
36+
37+
# https://github.com/actions/cache
38+
- name: Restore Yarn cache
39+
uses: actions/cache@v3.0.5
40+
with:
41+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
42+
key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}
43+
restore-keys: |
44+
yarn-cache-folder-
3345
3446
- name: Install Yarn dependencies
3547
run: yarn install --immutable

0 commit comments

Comments
 (0)