1
0
Fork 0
mirror of https://code.forgejo.org/actions/setup-go synced 2025-06-10 04:22:22 +02:00

Implement "check-latest" flag to check if pre-cached version is latest one (#186)

This commit is contained in:
Dmitry Shibanov 2022-02-09 14:59:04 +03:00 committed by GitHub
parent 44e221478f
commit bfdd3570ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 4811 additions and 3599 deletions

View file

@ -24,7 +24,13 @@ export async function run() {
let token = core.getInput('token');
let auth = !token || isGhes() ? undefined : `token ${token}`;
const installDir = await installer.getGo(versionSpec, stable, auth);
const checkLatest = core.getBooleanInput('check-latest');
const installDir = await installer.getGo(
versionSpec,
stable,
checkLatest,
auth
);
core.exportVariable('GOROOT', installDir);
core.addPath(path.join(installDir, 'bin'));