Skip to content

Output container details in the workflow summary#78207

Open
desrosj wants to merge 1 commit into
trunkfrom
add/published-GHCR-details
Open

Output container details in the workflow summary#78207
desrosj wants to merge 1 commit into
trunkfrom
add/published-GHCR-details

Conversation

@desrosj
Copy link
Copy Markdown
Member

@desrosj desrosj commented May 12, 2026

What?

This adds steps to output the published container details to the workflow summary when one is pushed to the GitHub Container Registry.

Why?

This makes it more clear when an asset is published to GHCR in a workflow run.

How?

This uses the native $GITHUB_STEP_SUMMARY feature.

Use of AI Tools

AI Usage: Yes
Tool: Claude Code
Model: Opus 4.7
Usage: Used Claude to create an initial draft adding the details to the workflow summary.

This adds steps to output the published container details to the workflow summary when one is pushed to the GitHub Container Registry.
@desrosj desrosj self-assigned this May 12, 2026
@desrosj desrosj added [Type] Build Tooling Issues or PRs related to build tooling GitHub Actions Pull requests that update GitHub Actions code labels May 12, 2026
@github-actions
Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: desrosj <desrosj@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions
Copy link
Copy Markdown

Flaky tests detected in f95b145.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/25746087327
📝 Reported issues:

@desrosj
Copy link
Copy Markdown
Member Author

desrosj commented May 12, 2026

Once/if #78211 is merged, the workflow changes in this PR can actually be tested because PRs would publish also assets.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds workflow steps to surface GitHub Container Registry publish details (image ref + package link) in the Actions run summary after pushing the build artifact to GHCR, improving visibility of published assets in WordPress/gutenberg push runs.

Changes:

  • Introduces job-level env vars for the published image reference and package name.
  • Splits the GHCR publish flow into: ORAS push → GitHub API lookup for the published package version URL → write a markdown table to $GITHUB_STEP_SUMMARY.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +319 to +333
const { data: versions } = await github.rest.packages.getAllPackageVersionsForPackageOwnedByOrg( {
org: 'WordPress',
package_type: 'container',
package_name: process.env.PACKAGE_NAME,
per_page: 20,
} );
const match = versions.find( ( v ) =>
v.metadata?.container?.tags?.includes( context.sha )
);
if ( ! match ) {
core.setFailed( `No package version found with tag ${ context.sha }` );
return '';
}
return match.html_url;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GitHub Actions Pull requests that update GitHub Actions code [Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants