mirror of
https://github.com/actions/setup-go.git
synced 2025-07-25 07:58:31 +02:00
Merge branch 'main' into v-dmshib/add-go-bin
This commit is contained in:
commit
9c0b5f2c57
9 changed files with 193 additions and 110 deletions
18
src/main.ts
18
src/main.ts
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue