You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> **Fork of [actions/setup-node](https://github.com/actions/setup-node)** — Node.js binaries are downloaded from the [npmmirror](https://npmmirror.com/) instead of the official Node.js dist, which significantly improves download speed in some self-hosted network environments.
9
+
8
10
This action provides the following functionality for GitHub Actions users:
9
11
10
-
- Optionally downloading and caching distribution of the requested Node.js version, and adding it to the PATH
12
+
- Optionally downloading and caching distribution of the requested Node.js version**via cnpm mirror**, and adding it to the PATH
# The token will be used as a bearer token in the Authorization header
109
-
# Default: ''
110
-
mirror-token: ''
111
99
```
112
100
<!-- end usage -->
113
101
@@ -125,7 +113,7 @@ steps:
125
113
126
114
The `node-version` input is optional. If not supplied, the node version from PATH will be used. However, it is recommended to always specify Node.js version and not rely on the system one.
127
115
128
-
The action will first check the local cache for a semver match. If unable to find a specific version in the cache, the action will attempt to download a version of Node.js. It will pull LTS versions from [node-versions releases](https://github.com/actions/node-versions/releases) and on miss or failure will fall back to downloading directly from [npm Mirror Node dist](https://cdn.npmmirror.com/binaries/node/).
116
+
The action will first check the local cache for a semver match. If unable to find a specific version in the cache, the action will attempt to download a version of Node.js. It will pull LTS versions from [node-versions releases](https://github.com/actions/node-versions/releases) and on miss or failure will fall back to downloading directly from the [cnpm mirror](https://cdn.npmmirror.com/binaries/node/).
129
117
130
118
For information regarding locally cached versions of Node.js on GitHub hosted runners, check out [GitHub Actions Runner Images](https://github.com/actions/runner-images).
131
119
@@ -143,7 +131,7 @@ Examples:
143
131
**Note:** Like the other values, `*` will get the latest [locally-cached Node.js version](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#nodejs), or the latest version from [actions/node-versions](https://github.com/actions/node-versions/blob/main/versions-manifest.json), depending on the [`check-latest`](docs/advanced-usage.md#check-latest-version) input.
144
132
145
133
`current`/`latest`/`node` always resolve to the latest [dist version](https://nodejs.org/dist/index.json).
146
-
That version is then downloaded from actions/node-versions if possible, or directly from https://cdn.npmmirror.com/binaries/node if not.
134
+
That version is then downloaded from actions/node-versions if possible, or directly from the [cnpm mirror](https://cdn.npmmirror.com/binaries/node/) if not.
147
135
Since it will not be cached always, there is possibility of hitting rate limit when downloading from dist
148
136
149
137
### Checking in lockfiles
@@ -249,7 +237,6 @@ If the runner is not able to access github.com, any Nodejs versions requested du
249
237
- [Publishing to npmjs and GPR with npm](docs/advanced-usage.md#publish-to-npmjs-and-gpr-with-npm)
250
238
- [Publishing to npmjs and GPR with yarn](docs/advanced-usage.md#publish-to-npmjs-and-gpr-with-yarn)
Copy file name to clipboardExpand all lines: action.yml
-4Lines changed: 0 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -25,10 +25,6 @@ inputs:
25
25
default: true
26
26
cache-dependency-path:
27
27
description: 'Used to specify the path to a dependency file: package-lock.json, yarn.lock, etc. Supports wildcards or a list of file names for caching multiple dependencies.'
28
-
mirror:
29
-
description: 'Used to specify an alternative mirror to download Node.js binaries from'
30
-
mirror-token:
31
-
description: 'The token used as Authorization header when fetching from the mirror'
32
28
# TODO: add input to control forcing to pull from cloud or dist.
33
29
# escape valve for someone having issues or needing the absolute latest which isn't cached yet
Copy file name to clipboardExpand all lines: docs/advanced-usage.md
-15Lines changed: 0 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -474,18 +474,3 @@ steps:
474
474
To access private GitHub Packages within the same organization, go to "Manage Actions access" in Package settings and set the repositories you want to access.
475
475
476
476
Please refer to the [Ensuring workflow access to your package - Configuring a package's access control and visibility](https://docs.github.com/en/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-workflow-access-to-your-package) for more details.
477
-
478
-
## Use private mirror
479
-
480
-
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.
481
-
The mirror URL can be set using the `mirror` input.
482
-
It is possible to specify a token to authenticate with the mirror using the `mirror-token` input.
483
-
The token will be passed in the `Authorization` header.
0 commit comments