mirror of https://github.com/actions/setup-go.git
change name of it
This commit is contained in:
parent
af7fba4129
commit
4ef8fc9d4c
|
@ -17,7 +17,7 @@ inputs:
|
|||
default: true
|
||||
cache-dependency-path:
|
||||
description: 'Used to specify the path to a dependency file - go.sum'
|
||||
buildTarget:
|
||||
buildTargetArch:
|
||||
description: 'Optional build target architecture (for example arm64 or amd64) used to scope the cache key.'
|
||||
architecture:
|
||||
description: 'Target architecture for Go to use. Examples: x86, x64. Will use system architecture by default.'
|
||||
|
|
|
@ -12,7 +12,7 @@ export const restoreCache = async (
|
|||
versionSpec: string,
|
||||
packageManager: string,
|
||||
cacheDependencyPath?: string,
|
||||
buildTarget?: string
|
||||
buildTargetArch?: string
|
||||
) => {
|
||||
const packageManagerInfo = await getPackageManagerInfo(packageManager);
|
||||
const platform = process.env.RUNNER_OS;
|
||||
|
@ -33,7 +33,7 @@ export const restoreCache = async (
|
|||
|
||||
const linuxVersion =
|
||||
process.env.RUNNER_OS === 'Linux' ? `${process.env.ImageOS}-` : '';
|
||||
const sanitizedBuildTarget = buildTarget?.trim();
|
||||
const sanitizedBuildTarget = buildTargetArch?.trim();
|
||||
const targetSegment = sanitizedBuildTarget ? `${sanitizedBuildTarget}-` : '';
|
||||
const primaryKey = `setup-go-${platform}-${arch}-${targetSegment}${linuxVersion}go-${versionSpec}-${fileHash}`;
|
||||
core.debug(`primary key is ${primaryKey}`);
|
||||
|
|
|
@ -20,7 +20,7 @@ export async function run() {
|
|||
setGoToolchain();
|
||||
|
||||
const cache = core.getBooleanInput('cache');
|
||||
const buildTarget = core.getInput('buildTarget');
|
||||
const buildTargetArch = core.getInput('buildTargetArch');
|
||||
core.info(`Setup go version spec ${versionSpec}`);
|
||||
|
||||
let arch = core.getInput('architecture') as Architecture;
|
||||
|
@ -75,7 +75,7 @@ export async function run() {
|
|||
parseGoVersion(goVersion),
|
||||
packageManager,
|
||||
cacheDependencyPath,
|
||||
buildTarget
|
||||
buildTargetArch
|
||||
);
|
||||
} catch (error) {
|
||||
core.warning(`Restore cache failed: ${(error as Error).message}`);
|
||||
|
|
Loading…
Reference in New Issue