refactor: enhance logging and group setup for Go version installation

pull/789/head
priyagupta108 2 weeks ago
parent fba3fb4ead
commit be69e2303e

@ -100576,12 +100576,14 @@ async function run() {
const versionSpec = resolveVersionInput();
setGoToolchain();
const cache = getBooleanInput('cache');
core_info(`Setup go version spec ${versionSpec}`);
let arch = getInput('architecture');
if (!arch) {
arch = external_os_default().arch();
}
if (versionSpec) {
startGroup(`Setup Go ${versionSpec}`);
try {
core_info(`Setup go version spec ${versionSpec}`);
const token = getInput('token');
const auth = !token ? undefined : `token ${token}`;
const checkLatest = getBooleanInput('check-latest');
@ -100603,6 +100605,10 @@ async function run() {
}
core_info(`Successfully set up Go version ${versionSpec}`);
}
finally {
endGroup();
}
}
else {
core_info('[warning]go-version input was not specified. The action will try to use pre-installed version.');
}

@ -21,7 +21,6 @@ export async function run() {
setGoToolchain();
const cache = core.getBooleanInput('cache');
core.info(`Setup go version spec ${versionSpec}`);
let arch = core.getInput('architecture') as Architecture;
@ -30,6 +29,10 @@ export async function run() {
}
if (versionSpec) {
core.startGroup(`Setup Go ${versionSpec}`);
try {
core.info(`Setup go version spec ${versionSpec}`);
const token = core.getInput('token');
const auth = !token ? undefined : `token ${token}`;
@ -65,6 +68,9 @@ export async function run() {
}
core.info(`Successfully set up Go version ${versionSpec}`);
} finally {
core.endGroup();
}
} else {
core.info(
'[warning]go-version input was not specified. The action will try to use pre-installed version.'

Loading…
Cancel
Save