Skip to content

Commit 499c1fd

Browse files
committed
fix: yarn cache
Signed-off-by: Jason C. Leach <jason.leach@fullboar.ca>
1 parent 8fd5484 commit 499c1fd

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

.github/workflows/quality.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,22 @@ jobs:
8080
- name: Setup NodeJS
8181
uses: ./.github/workflows/actions/setup-node
8282

83-
- name: Cache app node_modules
84-
uses: actions/cache@v3
83+
- name: Get Yarn cache directory path
84+
id: yarn-cache-dir-path
85+
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
86+
87+
- name: Restore Yarn cache
88+
uses: actions/cache@v4
89+
id: yarn-cache
8590
with:
86-
path: .yarn/cache
87-
# Cache will be invalidated if yarn.lock changes
88-
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
89-
restore-keys: ${{ runner.os }}-yarn-
91+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
92+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
93+
restore-keys: |
94+
${{ runner.os }}-yarn-
9095
9196
- name: Install dependencies
9297
working-directory: app
93-
run: yarn install --immutable-cache
98+
run: yarn install --immutable
9499

95100
- name: Automated testing
96101
run: yarn test

0 commit comments

Comments
 (0)