Skip to content

Commit 4c5dd27

Browse files
committed
fix: yarn cache
Signed-off-by: Jason C. Leach <jason.leach@fullboar.ca>
1 parent c7db6ad commit 4c5dd27

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

.github/workflows/quality.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,23 @@ jobs:
1515

1616
- uses: actions/setup-python@v4
1717
with:
18-
python-version: '3.11'
18+
python-version: "3.11"
1919

2020
- name: Setup NodeJS
2121
uses: ./.github/workflows/actions/setup-node
2222

23-
- name: Cache app node_modules
24-
uses: actions/cache@v3
23+
- name: Get Yarn cache directory path
24+
id: yarn-cache-dir-path
25+
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
26+
27+
- name: Restore Yarn cache
28+
uses: actions/cache@v4
29+
id: yarn-cache
2530
with:
26-
path: .yarn/cache
27-
# Cache will be invalidated if yarn.lock changes
28-
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
29-
restore-keys: ${{ runner.os }}-yarn-
31+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
32+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
33+
restore-keys: |
34+
${{ runner.os }}-yarn-
3035
3136
- name: Install dependencies
3237
working-directory: app
@@ -70,7 +75,7 @@ jobs:
7075

7176
- uses: actions/setup-python@v5
7277
with:
73-
python-version: '3.11'
78+
python-version: "3.11"
7479

7580
- name: Setup NodeJS
7681
uses: ./.github/workflows/actions/setup-node

0 commit comments

Comments
 (0)