mirror of
https://gitea.com/actions/setup-node.git
synced 2025-04-08 00:09:43 +00:00
feat: support private mirrors (#1240)
* feat: support private mirrors * chore: change fallback message with mirrors
This commit is contained in:
README.md
__tests__
action.ymldist/setup
docs
src
@ -418,3 +418,18 @@ Please refer to the [Ensuring workflow access to your package - Configuring a pa
|
||||
|
||||
### 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.
|
||||
|
||||
## Use private mirror
|
||||
|
||||
It is possible to use a private mirror hosting Node.js binaries. This mirror must be a full mirror of the official Node.js distribution.
|
||||
The mirror URL can be set using the `mirror` input.
|
||||
It is possible to specify a token to authenticate with the mirror using the `mirror-token` input.
|
||||
The token will be passed as a bearer token in the `Authorization` header.
|
||||
|
||||
```yaml
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '14.x'
|
||||
mirror: 'https://nodejs.org/dist'
|
||||
mirror-token: 'your-mirror-token'
|
||||
```
|
||||
|
Reference in New Issue
Block a user