mirror of
https://github.com/docker/build-push-action.git
synced 2025-06-05 04:01:50 +02: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:
parent
721e8c79de
commit
db1f6c46e8
3 changed files with 39 additions and 1 deletions
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue