File tree Expand file tree Collapse file tree
.github/actions/node-pnpm Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Setup node & pnpm
2+
3+ inputs :
4+ node_version :
5+ description : " Node.js version"
6+ type : number
7+ required : true
8+ pnpm_version :
9+ description : " Pnpm version"
10+ required : true
11+
12+ runs :
13+ using : " composite"
14+ steps :
15+ - name : Setup Node
16+ uses : actions/setup-node@v4
17+ with :
18+ node-version : ${{ inputs.node_version }}
19+
20+ - uses : pnpm/action-setup@v4
21+ name : Install pnpm
22+ id : pnpm-install
23+ with :
24+ version : ${{ inputs.pnpm_version }}
25+
26+ - name : Get pnpm store directory
27+ id : pnpm-cache
28+ shell : bash
29+ run : |
30+ echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
31+
32+ - name : Cache .pnpm-store
33+ uses : actions/cache@v4
34+ with :
35+ path : |
36+ ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
37+ # Generate a new cache whenever packages or source files change.
38+ key : |
39+ linux-OS-node-v${{inputs.node_version }}-pnpm-v${{inputs.pnpm_version}}-${{ hashFiles('**/pnpm-lock.yaml') }}
40+ restore-keys : |
41+ linux-OS-node-v${{inputs.node_version }}-pnpm-v${{inputs.pnpm_version}}-${{ hashFiles('**/pnpm-lock.yaml') }}
42+
43+ - name : Install packages
44+ shell : bash
45+ run : pnpm install --frozen-lockfile
You can’t perform that action at this time.
0 commit comments