mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-20 05:14:44 +00:00
Implement "check-latest" flag to check if pre-cached version is latest one (#165)
This commit is contained in:
parent
0e2f9cde8b
commit
1ae8f4b1fd
8 changed files with 327 additions and 55 deletions
|
@ -15,12 +15,13 @@ export async function run() {
|
|||
version = core.getInput('version');
|
||||
}
|
||||
|
||||
console.log(`version: ${version}`);
|
||||
if (version) {
|
||||
let token = core.getInput('token');
|
||||
let auth = !token || isGhes() ? undefined : `token ${token}`;
|
||||
let stable = (core.getInput('stable') || 'true').toUpperCase() === 'TRUE';
|
||||
await installer.getNode(version, stable, auth);
|
||||
const checkLatest =
|
||||
(core.getInput('check-latest') || 'false').toUpperCase() === 'TRUE';
|
||||
await installer.getNode(version, stable, checkLatest, auth);
|
||||
}
|
||||
|
||||
const registryUrl: string = core.getInput('registry-url');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue