diff options
| author | Fuwn <[email protected]> | 2026-03-01 18:04:51 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-03-01 18:06:05 -0800 |
| commit | f25cce0d781ab5bc650798bac27f77398ef25a45 (patch) | |
| tree | ae58fb8ddf9a63e5a0bd502f1378154dbd3f21e7 /.github/actions | |
| parent | chore(dx): add fast changed-files lint and format commands (diff) | |
| download | due.moe-f25cce0d781ab5bc650798bac27f77398ef25a45.tar.xz due.moe-f25cce0d781ab5bc650798bac27f77398ef25a45.zip | |
ci(dx): extract shared node+pnpm setup into composite action
Diffstat (limited to '.github/actions')
| -rw-r--r-- | .github/actions/setup-node-pnpm/action.yml | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/.github/actions/setup-node-pnpm/action.yml b/.github/actions/setup-node-pnpm/action.yml new file mode 100644 index 00000000..350c60a1 --- /dev/null +++ b/.github/actions/setup-node-pnpm/action.yml @@ -0,0 +1,35 @@ +name: Setup Node And pnpm +description: Setup pnpm, setup Node.js with pnpm cache, and install dependencies + +inputs: + node-version: + description: Node.js version + required: false + default: "20" + pnpm-version: + description: pnpm version + required: false + default: "10.28.0" + install: + description: Whether to install dependencies + required: false + default: "true" + +runs: + using: composite + steps: + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: ${{ inputs.pnpm-version }} + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ inputs.node-version }} + cache: pnpm + + - name: Install dependencies + if: ${{ inputs.install == 'true' }} + shell: bash + run: pnpm install --frozen-lockfile |