修改nodejs下载地址
Some checks are pending
Continuous Integration / GitHub Actions Test (push) Waiting to run

This commit is contained in:
soul-walker 2024-08-22 10:59:20 +08:00
parent f586867fa1
commit 68e0df6771

View File

@ -2,7 +2,7 @@ import * as core from '@actions/core'
import * as tc from '@actions/tool-cache'
import os from 'os'
const BinBaseUrl = 'https://nodejs.org/dist/'
const BinBaseUrl = 'https://joylink.club/public-files/nodejs/'
const DestDir = '/denv'
export function getFileName(version: string): string {
@ -18,7 +18,7 @@ export async function getInstalledPath(
version: string,
fileName: string
): Promise<string> {
const downloadUrl = `${BinBaseUrl}${version}/${fileName}`
const downloadUrl = `${BinBaseUrl}/${fileName}`
core.info(`Downloading from ${downloadUrl}`)
const downloadPath = await tc.downloadTool(downloadUrl)
core.info(`Extracting from ${downloadPath}`)