Skip to content

Commit

Permalink
Merge pull request #77 from crazy-max/fix-tc-cache
Browse files Browse the repository at this point in the history
buildx: set consistent platform when caching binary
  • Loading branch information
crazy-max committed Mar 26, 2023
2 parents 210b742 + e7eee6e commit 6152724
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/buildx/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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());
});
}

Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 6152724

Please sign in to comment.