mirror of
https://github.com/actions/setup-go.git
synced 2025-07-26 00:18:29 +02:00
Add get input in main
This commit is contained in:
parent
1286293c40
commit
1776f915f8
3 changed files with 12 additions and 4 deletions
|
@ -19,12 +19,19 @@ export async function run() {
|
|||
const cache = core.getBooleanInput('cache');
|
||||
core.info(`Setup go version spec ${versionSpec}`);
|
||||
|
||||
const arch = core.getInput('architecture');
|
||||
|
||||
if (versionSpec) {
|
||||
let token = core.getInput('token');
|
||||
let auth = !token || isGhes() ? undefined : `token ${token}`;
|
||||
|
||||
const checkLatest = core.getBooleanInput('check-latest');
|
||||
const installDir = await installer.getGo(versionSpec, checkLatest, auth);
|
||||
const installDir = await installer.getGo(
|
||||
versionSpec,
|
||||
checkLatest,
|
||||
auth,
|
||||
arch
|
||||
);
|
||||
|
||||
core.addPath(path.join(installDir, 'bin'));
|
||||
core.info('Added go to the path');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue