mirror of
https://github.com/ivuorinen/actions.git
synced 2026-01-26 11:34:00 +00:00
ivuorinen/actions/node-setup
Node Setup
Description
Sets up Node.js env 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, bun, auto) |
false |
auto |
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 |
"" |
max-retries |
Maximum number of retry attempts for package manager operations |
false |
3 |
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 |
esm-support |
Whether ESM modules are supported |
typescript-support |
Whether TypeScript is configured |
detected-frameworks |
Comma-separated list of detected frameworks |
Runs
This action is a composite action.
Usage
- 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, bun, auto)
#
# Required: false
# Default: auto
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: ""
max-retries:
# Maximum number of retry attempts for package manager operations
#
# Required: false
# Default: 3