Skip to content

Commit 04c214a

Browse files
committed
chore: fix pr workflow
1 parent fe68913 commit 04c214a

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

.github/workflows/pr.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,24 @@ jobs:
1717
uses: actions/setup-node@v4
1818
with:
1919
node-version: '20.x'
20-
cache: 'pnpm'
2120

2221
- name: Install pnpm
23-
run: npm install -g pnpm
22+
uses: pnpm/action-setup@v3
23+
with:
24+
version: 10
25+
26+
- name: Get pnpm store directory
27+
shell: bash
28+
run: |
29+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
30+
31+
- uses: actions/cache@v4
32+
name: Setup pnpm cache
33+
with:
34+
path: ${{ env.STORE_PATH }}
35+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
36+
restore-keys: |
37+
${{ runner.os }}-pnpm-store-
2438
2539
- name: Install dependencies
2640
run: pnpm install

0 commit comments

Comments
 (0)