change name of it

This commit is contained in:
Anton Izmailov 2025-09-25 14:58:35 +02:00
parent af7fba4129
commit 4ef8fc9d4c
3 changed files with 5 additions and 5 deletions

View File

@ -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.'

View File

@ -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}`);

View File

@ -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}`);