Merge pull request #77 from crazy-max/fix-tc-cache

buildx: set consistent platform when caching binary
This commit is contained in:
CrazyMax 2023-03-26 20:43:07 +02:00 committed by GitHub
commit 61527248dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {