Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit 3e304c8

Browse files
committed
ci: refactor cahe key path
1 parent 3a60c7b commit 3e304c8

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

.github/composite-actions/install/action.yml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,30 @@ runs:
1717
run: |
1818
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
1919
20+
- name: Get cypress cache directory path
21+
id: cypress-cache-dir
22+
shell: bash
23+
run: |
24+
echo "CYPRESS_BIN_PATH=$(npx cypress cache path)" >> $GITHUB_OUTPUT
25+
2026
- uses: actions/cache@v3
21-
name: Setup pnpm cache
27+
id: pnpm-cache
2228
with:
23-
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
24-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
29+
path: |
30+
${{ steps.pnpm-cache-dir.outputs.STORE_PATH }}
31+
${{ steps.cypress-cache-dir.outputs.CYPRESS_BIN_PATH }}
32+
key: ${{ runner.os }}-pnpm-cypress-${{ hashFiles('**/pnpm-lock.yaml') }}
2533
restore-keys: |
26-
${{ runner.os }}-pnpm-store-
34+
${{ runner.os }}-pnpm-cypress-
35+
${{ runner.os }}-pnpm-store-
2736
28-
- name: Cache Cypress binary
29-
uses: actions/cache@v3
30-
with:
31-
path: ~/.cache/Cypress
32-
key:
33-
cypress-${{ runner.os }}-cypress-${{ hashFiles('**/package.json') }}
34-
restore-keys: |
35-
cypress-${{ runner.os }}-cypress-
37+
# - uses: actions/cache@v3
38+
# name: Setup pnpm cache
39+
# with:
40+
# path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
41+
# key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
42+
# restore-keys: |
43+
# ${{ runner.os }}-pnpm-store-
3644

3745
- name: Setup Node.js
3846
uses: actions/setup-node@v3

0 commit comments

Comments
 (0)