mirror of
https://github.com/actions/setup-node.git
synced 2025-04-22 09:21:00 +00:00
update docs
This commit is contained in:
parent
9a425941d6
commit
d1f29d3cd9
2 changed files with 19 additions and 4 deletions
|
@ -15,7 +15,7 @@ inputs:
|
||||||
description: 'Set this option if you want the action to check for the latest available version that satisfies the version spec.'
|
description: 'Set this option if you want the action to check for the latest available version that satisfies the version spec.'
|
||||||
default: 'false'
|
default: 'false'
|
||||||
corepack:
|
corepack:
|
||||||
description: 'Automatically enables corepack'
|
description: 'Enable corepack. Setting this to anything but `true` will pass the value to `corepack enable`.'
|
||||||
default: 'false'
|
default: 'false'
|
||||||
registry-url:
|
registry-url:
|
||||||
description: 'Optional registry to set up for auth. Will set the registry in a project level .npmrc and .yarnrc file, and set up auth to read in from env.NODE_AUTH_TOKEN.'
|
description: 'Optional registry to set up for auth. Will set the registry in a project level .npmrc and .yarnrc file, and set up auth to read in from env.NODE_AUTH_TOKEN.'
|
||||||
|
|
|
@ -306,9 +306,9 @@ NOTE: As per https://github.com/actions/setup-node/issues/49 you cannot use `sec
|
||||||
### always-auth input
|
### always-auth input
|
||||||
The always-auth input sets `always-auth=true` in .npmrc file. With this option set [npm](https://docs.npmjs.com/cli/v6/using-npm/config#always-auth)/yarn sends the authentication credentials when making a request to the registries.
|
The always-auth input sets `always-auth=true` in .npmrc file. With this option set [npm](https://docs.npmjs.com/cli/v6/using-npm/config#always-auth)/yarn sends the authentication credentials when making a request to the registries.
|
||||||
|
|
||||||
## Automatically enable `corepack`
|
## Enable and/or configure `corepack`
|
||||||
|
|
||||||
_Requires Node >=14.19.0
|
_Requires Node >=14.19 or >=16.9_
|
||||||
|
|
||||||
`corepack` is a new experimental feature that automatically installs package managers as they are used. [Read more about it here](https://nodejs.org/docs/latest/api/corepack.html)
|
`corepack` is a new experimental feature that automatically installs package managers as they are used. [Read more about it here](https://nodejs.org/docs/latest/api/corepack.html)
|
||||||
|
|
||||||
|
@ -327,9 +327,24 @@ e.g.
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"name": "example",
|
"name": "example",
|
||||||
"packageManager": "pnpm@7.9.5",
|
"packageManager": "pnpm@7.13.2",
|
||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Passing anything but `true` will pass the options to the `corepack enable` command:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: '14.x'
|
||||||
|
corepack: npm
|
||||||
|
```
|
||||||
|
|
||||||
|
will call
|
||||||
|
|
||||||
|
```shell
|
||||||
|
corepack enable npm
|
||||||
|
```
|
||||||
|
|
Loading…
Add table
Reference in a new issue