mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-06-14 16:01:11 +00:00
Update
This commit is contained in:
parent
409b7dfb5b
commit
0930c1111e
2 changed files with 8 additions and 6 deletions
|
@ -1,5 +1,4 @@
|
|||
import * as fs from 'fs';
|
||||
import * as os from 'os';
|
||||
import * as core from '@actions/core';
|
||||
import * as path from 'path';
|
||||
import * as exec from '@actions/exec';
|
||||
|
||||
|
@ -7,8 +6,8 @@ export async function configAuth(registryUrl: string) {
|
|||
let npmrc: string = path.resolve(process.cwd(), '.npmrc');
|
||||
let yarnrc: string = path.resolve(process.cwd(), '.yarnrc');
|
||||
|
||||
writeRegistryToFile(registryUrl, 'npm', 'NPM_TOKEN');
|
||||
writeRegistryToFile(registryUrl, 'yarn', 'YARN_TOKEN');
|
||||
await writeRegistryToFile(registryUrl, 'npm', 'NPM_TOKEN');
|
||||
// writeRegistryToFile(registryUrl, 'yarn', 'YARN_TOKEN');
|
||||
}
|
||||
|
||||
async function writeRegistryToFile(
|
||||
|
@ -16,6 +15,7 @@ async function writeRegistryToFile(
|
|||
packageManager: string,
|
||||
authTokenName: string
|
||||
) {
|
||||
core.debug(`Setting up ${packageManager} auth`);
|
||||
await exec.exec(`${packageManager} config set registry=${registryUrl}`);
|
||||
await exec.exec(`${packageManager} config set always-auth=true`);
|
||||
await exec.exec(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue