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 default: true
cache-dependency-path: cache-dependency-path:
description: 'Used to specify the path to a dependency file - go.sum' 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.' description: 'Optional build target architecture (for example arm64 or amd64) used to scope the cache key.'
architecture: architecture:
description: 'Target architecture for Go to use. Examples: x86, x64. Will use system architecture by default.' 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, versionSpec: string,
packageManager: string, packageManager: string,
cacheDependencyPath?: string, cacheDependencyPath?: string,
buildTarget?: string buildTargetArch?: string
) => { ) => {
const packageManagerInfo = await getPackageManagerInfo(packageManager); const packageManagerInfo = await getPackageManagerInfo(packageManager);
const platform = process.env.RUNNER_OS; const platform = process.env.RUNNER_OS;
@ -33,7 +33,7 @@ export const restoreCache = async (
const linuxVersion = const linuxVersion =
process.env.RUNNER_OS === 'Linux' ? `${process.env.ImageOS}-` : ''; process.env.RUNNER_OS === 'Linux' ? `${process.env.ImageOS}-` : '';
const sanitizedBuildTarget = buildTarget?.trim(); const sanitizedBuildTarget = buildTargetArch?.trim();
const targetSegment = sanitizedBuildTarget ? `${sanitizedBuildTarget}-` : ''; const targetSegment = sanitizedBuildTarget ? `${sanitizedBuildTarget}-` : '';
const primaryKey = `setup-go-${platform}-${arch}-${targetSegment}${linuxVersion}go-${versionSpec}-${fileHash}`; const primaryKey = `setup-go-${platform}-${arch}-${targetSegment}${linuxVersion}go-${versionSpec}-${fileHash}`;
core.debug(`primary key is ${primaryKey}`); core.debug(`primary key is ${primaryKey}`);

View File

@ -20,7 +20,7 @@ export async function run() {
setGoToolchain(); setGoToolchain();
const cache = core.getBooleanInput('cache'); const cache = core.getBooleanInput('cache');
const buildTarget = core.getInput('buildTarget'); const buildTargetArch = core.getInput('buildTargetArch');
core.info(`Setup go version spec ${versionSpec}`); core.info(`Setup go version spec ${versionSpec}`);
let arch = core.getInput('architecture') as Architecture; let arch = core.getInput('architecture') as Architecture;
@ -75,7 +75,7 @@ export async function run() {
parseGoVersion(goVersion), parseGoVersion(goVersion),
packageManager, packageManager,
cacheDependencyPath, cacheDependencyPath,
buildTarget buildTargetArch
); );
} catch (error) { } catch (error) {
core.warning(`Restore cache failed: ${(error as Error).message}`); core.warning(`Restore cache failed: ${(error as Error).message}`);