Output container details in the workflow summary#78207
Conversation
This adds steps to output the published container details to the workflow summary when one is pushed to the GitHub Container Registry.
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Flaky tests detected in f95b145. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/25746087327
|
|
Once/if #78211 is merged, the workflow changes in this PR can actually be tested because PRs would publish also assets. |
There was a problem hiding this comment.
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.
| 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; | ||
|
|
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_SUMMARYfeature.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.