GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: add support for Docker Build Cloud summary by nico1510 · Pull Request #1370 · docker/build-push-action

Conversation

@nico1510

@nico1510 nico1510 commented Apr 30, 2025

Copy link
Copy Markdown
Member

What’s Changed

  • Adds support for Docker Build Cloud: when the cloud driver is used, the action now generates a summary with a direct link to the build details on app.docker.com.

Test:
Run the action with both drivers and check the summary output for the correct link and format.

Example output:
image

image

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions github-actions Bot assigned nico1510 Apr 30, 2025
nico1510 added 2 commits April 30, 2025 15:05
@nico1510
feat: add support for Docker Build Cloud summary and refactor summary…
926b923
… state

- Add summaryType state to distinguish between buildx and cloud summaries.
- Generate a Docker Build Cloud summary with a direct link to build details on app.docker.com when using the cloud driver.
- Refactor state-helper to use summaryType instead of isSummarySupported.
- Improve summary selection logic and output for both buildx and cloud drivers.
- Add informative logging for cloud build summary links.

Signed-off-by: Nicolas Beck <[email protected]>
@nico1510
commit dist
7b9dfc5
Signed-off-by: Nicolas Beck <[email protected]>
@nico1510
nico1510 force-pushed the add-cloud-summary branch from fd4aebd to 7b9dfc5 Compare April 30, 2025 13:06
crazy-max
crazy-max reviewed May 12, 2025
View reviewed changes

@crazy-max crazy-max left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With #1364 we could have both export and link to the build for cloud driver I think.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/main.ts Outdated
Comment on lines +176 to +178
} else if (builder && builder.driver === 'cloud') {
core.info('Build summary is not yet supported with Docker Build Cloud');
core.info('Build summary supported for cloud driver!');
stateHelper.setSummaryType('cloud');

@crazy-max crazy-max May 12, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should just remove this condition if we support cloud driver imo.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/main.ts Outdated
} else {
core.info('Build summary supported!');
stateHelper.setSummarySupported();
stateHelper.setSummaryType('buildx');

@crazy-max crazy-max May 12, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should keep setSummarySupported but have a new state helper const setBuilderDriver for builder driver that we could use in post state.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/main.ts Outdated
Comment on lines +226 to +237
} else if (stateHelper.summaryType === 'cloud' && stateHelper.buildRef) {
const [, platform, refId] = stateHelper.buildRef.split('/');
if (platform && refId) {
const buildUrl = `https://app.docker.com/build/accounts/docker/builds/${platform}/${refId}`;

core.info(`View build details: ${buildUrl}`);

const sum = core.summary.addHeading('Docker Build Cloud summary', 2);
sum.addRaw('<p>').addRaw('Your build was executed using Docker Build Cloud. ').addRaw('You can view detailed build information, logs, and results here: ').addLink(buildUrl, buildUrl).addRaw('</p>');
sum.addRaw('<p>').addRaw('For more information about Docker Build Cloud, see ').addLink('the documentation', 'https://docs.docker.com/build/cloud/').addRaw('.').addRaw('</p>');
await sum.addSeparator().write();
}

@crazy-max crazy-max May 12, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to previous comment we can remove this condition and we should move this logic to the actions-toolkit in GitHub.writeBuildSummary: https://github.com/docker/actions-toolkit/blob/ba0e8d7ed8b86856c1605c90b57f7ee543d6740b/src/github.ts#L229 so it can be used with bake-action as well.

Btw how multiple builds with bake would be handled?: https://github.com/docker/bake-action/blob/76f9fa3a758507623da19f6092dc4089a7e61592/src/main.ts#L210-L246

We need to be consistent between both build-push-action and bake-action imo. I think for multiple builds with bake we could have the list of builds filtered like https://app.docker.com/build/accounts/docker/builds?refs=foo,bar if possible?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@crazy-max crazy-max mentioned this pull request May 12, 2025
github: support cloud build URL when writing summary docker/actions-toolkit#686
Merged
@nico1510
PR feedback
2257560
@crazy-max

crazy-max commented Jun 13, 2025

Copy link
Copy Markdown
Member

fixed in #1381

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@crazy-max crazy-max closed this Jun 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@crazy-max crazy-max crazy-max left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@nico1510 nico1510

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@nico1510 @crazy-max
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.