Implement "check-latest" flag to check if pre-cached version is latest one (#165)

This commit is contained in:
Maxim Lobanov 2020-06-29 21:56:37 +03:00 committed by GitHub
parent 0e2f9cde8b
commit 1ae8f4b1fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 327 additions and 55 deletions

View file

@ -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');