DOCKER_BUILD_NO_SUMMARY env to disable summary

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2024-05-15 09:40:14 +02:00
parent 3602ada5a6
commit 607c3f5f5a
No known key found for this signature in database
GPG Key ID: ADE44D8C9D44FBE4
2 changed files with 10 additions and 0 deletions

View File

@ -256,6 +256,12 @@ The following outputs are available:
| `digest` | String | Image digest |
| `metadata` | JSON | Build result metadata |
### environment variables
| Name | Type | Description |
|---------------------------|------|-------------------------------------------------|
| `DOCKER_BUILD_NO_SUMMARY` | Bool | If `true`, build summary generation is disabled |
## Troubleshooting
See [TROUBLESHOOTING.md](TROUBLESHOOTING.md)

View File

@ -136,6 +136,10 @@ actionsToolkit.run(
async () => {
if (stateHelper.buildRef.length > 0) {
await core.group(`Generating build summary`, async () => {
if (process.env.DOCKER_BUILD_NO_SUMMARY && Util.parseBool(process.env.DOCKER_BUILD_NO_SUMMARY)) {
core.info('Summary disabled');
return;
}
try {
const buildxHistory = new BuildxHistory();
const exportRes = await buildxHistory.export({