Merge branch 'main' into v-dmshib/add-go-bin

This commit is contained in:
Dmitry Shibanov 2023-03-14 16:11:06 +01:00
commit 9c0b5f2c57
9 changed files with 193 additions and 110 deletions

View file

@ -50,6 +50,10 @@ export async function run() {
core.info('Setting GOROOT for Go version < 1.9');
core.exportVariable('GOROOT', installDir);
}
} else {
core.info(
'[warning]go-version input was not specified. The action will try to use pre-installed version.'
);
}
const added = await addBinToPath();
@ -62,11 +66,15 @@ export async function run() {
if (cache && isCacheFeatureAvailable()) {
const packageManager = 'default';
const cacheDependencyPath = core.getInput('cache-dependency-path');
await restoreCache(
parseGoVersion(goVersion),
packageManager,
cacheDependencyPath
);
try {
await restoreCache(
parseGoVersion(goVersion),
packageManager,
cacheDependencyPath
);
} catch (error) {
core.warning(`Restore cache failed: ${error.message}`);
}
}
// add problem matchers