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:
parent
6bc15ab23c
commit
2349c84f5c
12 changed files with 712 additions and 73 deletions
11
src/main.ts
11
src/main.ts
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue