# ivuorinen/actions/node-setup ## Node Setup ### Description Sets up Node.js environment with advanced version management, caching, and tooling. ### Inputs | name | description | required | default | | ----------------- | ------------------------------------------------------------------------ | -------- | ---------------------------- | | `default-version` |
Default Node.js version to use if no configuration file is found.
| `false` | `22` | | `package-manager` |Node.js package manager to use (npm, yarn, pnpm)
| `false` | `npm` | | `registry-url` |Custom NPM registry URL
| `false` | `https://registry.npmjs.org` | | `token` |Auth token for private registry
| `false` | `""` | | `cache` |Enable dependency caching
| `false` | `true` | | `install` |Automatically install dependencies
| `false` | `true` | | `node-mirror` |Custom Node.js binary mirror
| `false` | `""` | | `force-version` |Force specific Node.js version regardless of config files
| `false` | `""` | ### Outputs | name | description | | ----------------- | ----------------------------------------- | | `node-version` |Installed Node.js version
| | `package-manager` |Selected package manager
| | `cache-hit` |Indicates if there was a cache hit
| | `node-path` |Path to Node.js installation
| ### Runs This action is a `composite` action. ### Usage ```yaml - uses: ivuorinen/actions/node-setup@main with: default-version: # Default Node.js version to use if no configuration file is found. # # Required: false # Default: 22 package-manager: # Node.js package manager to use (npm, yarn, pnpm) # # Required: false # Default: npm registry-url: # Custom NPM registry URL # # Required: false # Default: https://registry.npmjs.org token: # Auth token for private registry # # Required: false # Default: "" cache: # Enable dependency caching # # Required: false # Default: true install: # Automatically install dependencies # # Required: false # Default: true node-mirror: # Custom Node.js binary mirror # # Required: false # Default: "" force-version: # Force specific Node.js version regardless of config files # # Required: false # Default: "" ```