Skip to content

Set up your GitHub Actions workflow with a specific version of node.js using nvm.

License

Notifications You must be signed in to change notification settings

irby/setup-node-nvm

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
 
 

Repository files navigation

Set up node using nvm

This action sets up a specific node.js version on GitHub Actions using nvm, very similar to @actions/setup-node. Unlike setup-node (at the time of this writing) it does support several aliases and custom mirrors like the one for node-v8. Note that this is merely intended as a placeholder until setup-node supports aliases, which is crucial for rolling testing, and mirrors, which is useful for WebAssembly testing. Has some Windows support via nvm-windows, but there are issues with versions newer than current and .nvmrc.

Inputs

node-version

The node.js version to install and use, according to nvm. Uses the version specified in .nvmrc if omitted.

node-mirror

The node.js mirror to use, e.g. https://nodejs.org/download/v8-canary/ for node on V8 lkgr.

Example usage:

Use latest LTS version of Node

uses: irby/setup-node-nvm@master
with:
  node-version: lts/*

Use current Node version at mirror location

uses: irby/setup-node-nvm@master
with:
  node-version: node
  node-mirror: https://nodejs.org/download/v8-canary/

Use version specified in .nvm

Will try to read .nvmrc at root level of repository calling the action.

If this value cannot be read, it will use the .nvmrc version defined in this repository.

uses: irby/setup-node-nvm@master

About

Set up your GitHub Actions workflow with a specific version of node.js using nvm.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 70.5%
  • PowerShell 17.1%
  • Shell 12.4%