mirror of
https://gitea.com/docker/build-push-action.git
synced 2025-07-14 15:47:07 +08:00
DOCKER_BUILD_EXPORT_LEGACY env var to opt-in for legacy export
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
10
src/main.ts
10
src/main.ts
@ -200,7 +200,8 @@ actionsToolkit.run(
|
||||
|
||||
const buildxHistory = new BuildxHistory();
|
||||
const exportRes = await buildxHistory.export({
|
||||
refs: stateHelper.buildRef ? [stateHelper.buildRef] : []
|
||||
refs: stateHelper.buildRef ? [stateHelper.buildRef] : [],
|
||||
useContainer: buildExportLegacy()
|
||||
});
|
||||
core.info(`Build record written to ${exportRes.dockerbuildFilename} (${Util.formatFileSize(exportRes.dockerbuildSize)})`);
|
||||
|
||||
@ -294,3 +295,10 @@ function buildRecordRetentionDays(): number | undefined {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
function buildExportLegacy(): boolean {
|
||||
if (process.env.DOCKER_BUILD_EXPORT_LEGACY) {
|
||||
return Util.parseBool(process.env.DOCKER_BUILD_EXPORT_LEGACY);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user