Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,18 @@ inputs:
runs:
using: composite
steps:
- name: Read required Node.js version from the action's .nvmrc
id: node-version
shell: bash
# `actions/setup-node`'s `node-version-file` input is resolved relative to `$GITHUB_WORKSPACE`,
# so an absolute path from `github.action_path` gets concatenated with the workspace prefix and
# fails to resolve. Read the value here and pass it as a literal `node-version` instead.
run: echo "version=$(cat "${GITHUB_ACTION_PATH}/.nvmrc")" >> "$GITHUB_OUTPUT"

- name: set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: ${{ github.action_path }}/.nvmrc
node-version: ${{ steps.node-version.outputs.version }}

- name: set up pnpm
uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5
Expand Down