From e7eee6e4010319f52404ed0f6607e7d8debc152a Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 25 Mar 2023 13:58:21 +0100 Subject: [PATCH] buildx: set consistent platform when caching binary Signed-off-by: CrazyMax --- src/buildx/install.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/buildx/install.ts b/src/buildx/install.ts index da987ab4..7d07b02a 100644 --- a/src/buildx/install.ts +++ b/src/buildx/install.ts @@ -88,7 +88,7 @@ export class Install { if (res.stderr.length > 0 && res.exitCode != 0) { core.warning(res.stderr.trim()); } - return tc.cacheFile(`${outputDir}/buildx`, os.platform() == 'win32' ? 'docker-buildx.exe' : 'docker-buildx', 'buildx', vspec); + return tc.cacheFile(`${outputDir}/buildx`, os.platform() == 'win32' ? 'docker-buildx.exe' : 'docker-buildx', 'buildx', vspec, this.platform()); }); } @@ -179,7 +179,7 @@ export class Install { core.info(`Downloading ${downloadURL}`); const downloadPath = await tc.downloadTool(downloadURL); core.debug(`Install.fetchBinary downloadPath: ${downloadPath}`); - return await tc.cacheFile(downloadPath, targetFile, 'buildx', version); + return await tc.cacheFile(downloadPath, targetFile, 'buildx', version, this.platform()); } private platform(): string {