Skip to content

Commit 5b2a84c

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

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

.github/workflows/quality.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +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: |
27-
app/node_modules
28-
# Cache will be invalidated if package.json or yarn.lock changes
29-
key: ${{ runner.os }}-app-node_modules-${{ hashFiles('app/package.json', 'app/yarn.lock') }}
31+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
32+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
3033
restore-keys: |
31-
${{ runner.os }}-app-node_modules-
34+
${{ runner.os }}-yarn-
3235
3336
- name: Install dependencies
3437
working-directory: app
@@ -72,7 +75,7 @@ jobs:
7275

7376
- uses: actions/setup-python@v5
7477
with:
75-
python-version: '3.11'
78+
python-version: "3.11"
7679

7780
- name: Setup NodeJS
7881
uses: ./.github/workflows/actions/setup-node

0 commit comments

Comments
 (0)