Skip to content

Commit cfdc7df

Browse files
committed
ci: simplify pnpm setup by using built-in node caching
1 parent c4a09da commit cfdc7df

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

.github/actions/setup-pnpm/action.yml

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,30 @@ inputs:
1919
runs:
2020
using: "composite"
2121
steps:
22-
- name: Install Node
23-
uses: actions/setup-node@v4
24-
with:
25-
node-version: ${{ inputs.node-version }}
26-
# cache: 'pnpm'
27-
# cache-dependency-path: '**/pnpm-lock.yaml'
28-
2922
- name: Install pnpm
3023
uses: pnpm/action-setup@v4
24+
with:
25+
version: 'latest'
3126

32-
- name: Get pnpm store directory
33-
shell: bash
34-
run: |
35-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
36-
37-
- name: Setup pnpm cache
38-
uses: actions/cache@v4
27+
- name: Install Node
28+
uses: actions/setup-node@v4
3929
with:
40-
path: ${{ env.STORE_PATH }}
41-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
42-
restore-keys: |
43-
${{ runner.os }}-pnpm-store-
30+
node-version: ${{ inputs.node-version }}
31+
cache: 'pnpm'
32+
cache-dependency-path: '**/pnpm-lock.yaml'
33+
34+
# - name: Get pnpm store directory
35+
# shell: bash
36+
# run: |
37+
# echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
38+
#
39+
# - name: Setup pnpm cache
40+
# uses: actions/cache@v4
41+
# with:
42+
# path: ${{ env.STORE_PATH }}
43+
# key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
44+
# restore-keys: |
45+
# ${{ runner.os }}-pnpm-store-
4446

4547
- name: Install dependencies
4648
shell: bash

0 commit comments

Comments
 (0)