mirror of
https://github.com/docker/bake-action.git
synced 2025-12-06 15:58:22 +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
@@ -220,7 +220,8 @@ actionsToolkit.run(
|
||||
|
||||
const buildxHistory = new BuildxHistory();
|
||||
const exportRes = await buildxHistory.export({
|
||||
refs: stateHelper.buildRefs
|
||||
refs: stateHelper.buildRefs,
|
||||
useContainer: buildExportLegacy()
|
||||
});
|
||||
core.info(`Build records written to ${exportRes.dockerbuildFilename} (${Util.formatFileSize(exportRes.dockerbuildSize)})`);
|
||||
|
||||
@@ -317,3 +318,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