Skip to content

Commit

Permalink
add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
barbados-clemens committed May 24, 2024
1 parent 7df9620 commit 877ba77
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions workflow-steps/install-node/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## Usage

```yaml
- name: Install Node
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/install-node/main.yaml'
inputs:
node_version: '20'
```
### Options
#### node_version
The node version to be installed. Any valid [nvm](https://github.com/nvm-sh/nvm/blob/master/README.md#usage) version is accepted.
This input is optional, as the step will also check for a `.nvmrc` file in the root of the repository.
If the file is present, the step will install the version specified in the file.
If the file is not present, the step will not install any node version and leave the default installed node version on the image for subsequent steps

For those using `volta`, the `volta.node` field in the `package.json` will also be picked up and used if present.

The current order of precedence is:

1. `node_version` input
1. `.nvmrc` file
1. `volta.node` field in `package.json`

For example:

- Install a specific node version: `node_version: '20.11.1'`
- Install latest of major node version: `node_version: '20'`

0 comments on commit 877ba77

Please sign in to comment.