mirror of
https://github.com/actions/setup-go.git
synced 2025-04-23 17:40:50 +00:00
fix: add support to pass tokens to GH from GHES
removing the logic that limits token authentication on GHES instances (this is a feature that GHES instances can use). Anyone (GHES or not) should be able to pass token as an input value and have it be used.
This commit is contained in:
parent
4c32251b06
commit
6591e26d40
1 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,7 @@ import * as installer from './installer';
|
||||||
import * as semver from 'semver';
|
import * as semver from 'semver';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import {restoreCache} from './cache-restore';
|
import {restoreCache} from './cache-restore';
|
||||||
import {isGhes, isCacheFeatureAvailable} from './cache-utils';
|
import {isCacheFeatureAvailable} from './cache-utils';
|
||||||
import cp from 'child_process';
|
import cp from 'child_process';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import os from 'os';
|
import os from 'os';
|
||||||
|
@ -28,7 +28,7 @@ export async function run() {
|
||||||
|
|
||||||
if (versionSpec) {
|
if (versionSpec) {
|
||||||
let token = core.getInput('token');
|
let token = core.getInput('token');
|
||||||
let auth = !token || isGhes() ? undefined : `token ${token}`;
|
let auth = !token ? undefined : `token ${token}`;
|
||||||
|
|
||||||
const checkLatest = core.getBooleanInput('check-latest');
|
const checkLatest = core.getBooleanInput('check-latest');
|
||||||
const installDir = await installer.getGo(
|
const installDir = await installer.getGo(
|
||||||
|
|
Loading…
Add table
Reference in a new issue