From 6591e26d40c03f647d8b70f8383daf11fa680181 Mon Sep 17 00:00:00 2001 From: Austin Sasko Date: Thu, 8 Sep 2022 16:11:07 -0400 Subject: [PATCH] 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. --- src/main.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index 8648d4def..398ed7831 100644 --- a/src/main.ts +++ b/src/main.ts @@ -4,7 +4,7 @@ import * as installer from './installer'; import * as semver from 'semver'; import path from 'path'; import {restoreCache} from './cache-restore'; -import {isGhes, isCacheFeatureAvailable} from './cache-utils'; +import {isCacheFeatureAvailable} from './cache-utils'; import cp from 'child_process'; import fs from 'fs'; import os from 'os'; @@ -28,7 +28,7 @@ export async function run() { if (versionSpec) { 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 installDir = await installer.getGo(