1
0
Fork 0
mirror of https://code.forgejo.org/actions/setup-node synced 2025-06-11 22:34:10 +02:00

Add support for nightly and rc versions (#611)

This commit is contained in:
Dmitry Shibanov 2022-11-17 14:35:58 +01:00 committed by GitHub
parent 6bc15ab23c
commit 2349c84f5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 712 additions and 73 deletions

View file

@ -6,7 +6,7 @@ import * as auth from './authutil';
import * as path from 'path';
import {restoreCache} from './cache-restore';
import {isGhes, isCacheFeatureAvailable} from './cache-utils';
import os = require('os');
import os from 'os';
export async function run() {
try {
@ -14,7 +14,7 @@ export async function run() {
// Version is optional. If supplied, install / use from the tool cache
// If not supplied then task is still used to setup proxy, auth, etc...
//
let version = resolveVersionInput();
const version = resolveVersionInput();
let arch = core.getInput('architecture');
const cache = core.getInput('cache');
@ -32,9 +32,10 @@ export async function run() {
}
if (version) {
let token = core.getInput('token');
let auth = !token ? undefined : `token ${token}`;
let stable = (core.getInput('stable') || 'true').toUpperCase() === 'TRUE';
const token = core.getInput('token');
const auth = !token ? undefined : `token ${token}`;
const stable =
(core.getInput('stable') || 'true').toUpperCase() === 'TRUE';
const checkLatest =
(core.getInput('check-latest') || 'false').toUpperCase() === 'TRUE';
await installer.getNode(version, stable, checkLatest, auth, arch);