-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5d85fd6
commit fd9c1a2
Showing
2 changed files
with
72 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: 'Install pnpm dependencies' | ||
description: 'Install pnpm dependencies from scratch or from cache' | ||
|
||
inputs: | ||
node-version: | ||
description: 'The Node.js version to use' | ||
default: '16' | ||
required: false | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
|
||
- uses: pnpm/action-setup@v2.2.2 | ||
with: | ||
version: 7 | ||
run_install: false | ||
|
||
- name: 'Get pnpm store directory' | ||
id: pnpm-cache | ||
shell: bash | ||
run: | | ||
echo "::set-output name=dir::$(pnpm store path)" | ||
- name: 'Prepare pnpm cache' | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.dir }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: 'Install pnpm dependencies' | ||
shell: bash | ||
run: pnpm install --frozen-lockfile |