Return undefined if GHES_TOKEN is not set when running on GHES

This commit is contained in:
Henrik Poulsen 2022-01-11 14:34:27 +01:00
parent 0b992d8a43
commit 06ce3b622f
2 changed files with 6 additions and 2 deletions

2
dist/setup/index.js vendored
View file

@ -52266,7 +52266,9 @@ const utils_1 = __webpack_require__(163);
const TOKEN = core.getInput('token'); const TOKEN = core.getInput('token');
const GHES_TOKEN = core.getInput('ghes_token'); const GHES_TOKEN = core.getInput('ghes_token');
const AUTH = utils_1.isGhes() const AUTH = utils_1.isGhes()
? GHES_TOKEN
? `token ${GHES_TOKEN}` ? `token ${GHES_TOKEN}`
: undefined
: TOKEN : TOKEN
? `token ${TOKEN}` ? `token ${TOKEN}`
: undefined; : undefined;

View file

@ -8,7 +8,9 @@ import {IS_WINDOWS, IS_LINUX, isGhes} from './utils';
const TOKEN = core.getInput('token'); const TOKEN = core.getInput('token');
const GHES_TOKEN = core.getInput('ghes_token'); const GHES_TOKEN = core.getInput('ghes_token');
const AUTH = isGhes() const AUTH = isGhes()
? GHES_TOKEN
? `token ${GHES_TOKEN}` ? `token ${GHES_TOKEN}`
: undefined
: TOKEN : TOKEN
? `token ${TOKEN}` ? `token ${TOKEN}`
: undefined; : undefined;