Files
firezone/.github/actions/setup-node/action.yml
Jamil 37472fee49 build(deps): Bump nodejs to 22 (#10586)
Bumps node from the now-unsupported 20 LTS to the currently active 22
LTS which fixes a few compile warnings for the website.
2025-10-16 08:01:59 +00:00

36 lines
1.1 KiB
YAML

name: "Setup Node"
description: "Sets up the correct Node version and installs pnpm"
inputs:
lockfile-dir:
description: "Path to the pnpm-lock.yaml file"
required: true
npmjs-token:
description: "NPMJS token to use for authentication"
required: true
node-version:
description: "Version of nodejs to install"
required: false
default: "22"
runs:
using: "composite"
steps:
- name: Configure npm auth
shell: bash
run: |
if [[ -z "${{ inputs.npmjs-token }}" ]]; then
echo "inputs.npmjs-token not provided" >&2
exit 1
fi
cat > "$HOME/.npmrc" <<'RC'
always-auth=true
//registry.npmjs.org/:_authToken=${{ inputs.npmjs-token }}
RC
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
with:
version: latest
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: ${{ inputs.node-version }}
cache: pnpm
cache-dependency-path: ${{ inputs.lockfile-dir }}