Skip to content

Commit 8c7f725

Browse files
committed
ci: use setup-node yarn cache
1 parent ebed1bb commit 8c7f725

1 file changed

Lines changed: 2 additions & 22 deletions

File tree

.github/actions/setup/action.yml

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,13 @@ runs:
88
uses: actions/setup-node@v5
99
with:
1010
node-version-file: .nvmrc
11+
cache: yarn
12+
cache-dependency-path: yarn.lock
1113

1214
- name: Init submodules
1315
run: git submodule update --init --recursive
1416
shell: bash
1517

16-
- name: Restore dependencies
17-
id: yarn-cache
18-
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
19-
with:
20-
path: |
21-
**/node_modules
22-
.yarn/install-state.gz
23-
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
24-
restore-keys: |
25-
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
26-
${{ runner.os }}-yarn-
27-
2818
- name: Install dependencies
29-
if: steps.yarn-cache.outputs.cache-hit != 'true'
3019
run: yarn install --immutable
3120
shell: bash
32-
33-
- name: Cache dependencies
34-
if: steps.yarn-cache.outputs.cache-hit != 'true'
35-
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
36-
with:
37-
path: |
38-
**/node_modules
39-
.yarn/install-state.gz
40-
key: ${{ steps.yarn-cache.outputs.cache-primary-key }}

0 commit comments

Comments
 (0)