Skip to content

Commit

Permalink
DOCKER_BUILD_NO_SUMMARY env to disable summary
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed May 15, 2024
1 parent 761d093 commit 739c7bf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 739c7bf

Please sign in to comment.