name: Setup Node.js + PNPM and install Dependencies description: | This is a composite GitHub Action that: - Sets up pnpm package manager - Configures Node.js environment - Installs project dependencies with caching inputs: node-version: description: "Explicit node version. Otherwise fallback reading `.nvmrc`" runs: using: composite steps: - name: Install pnpm uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5 - name: Setup Node.js (via input) if: ${{ inputs.node-version }} uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 with: node-version: ${{ inputs.node-version }} cache: "pnpm" registry-url: "https://registry.npmjs.org" - name: Setup Node.js (via .nvmrc) if: ${{ !inputs.node-version }} uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 with: node-version-file: ".nvmrc" cache: "pnpm" registry-url: "https://registry.npmjs.org" - name: Install Dependencies shell: bash run: pnpm install --frozen-lockfile