Skip to content

CI: replace custom job_status output with native needs.<job>.result - #78319

Closed
Gilmoursa wants to merge 1 commit into
WordPress:trunkfrom
Gilmoursa:fix/use-native-job-result
Closed

Gilmoursa wants to merge 1 commit into
WordPress:trunkfrom
Gilmoursa:fix/use-native-job-result

Conversation

@Gilmoursa

Copy link
Copy Markdown

What?

Fixes #78203

Removes the custom job_status output from the build job in build-plugin-zip.yml and replaces its two downstream usages with the native GitHub Actions needs.<job_id>.result context.

Why?

GitHub Actions natively exposes job success/failure status through needs.<job_id>.result. Using a custom output to re-expose job.status is redundant, adds unnecessary indirection, and could introduce subtle bugs or security issues if the pattern spreads.

How?

  • Removed outputs: job_status: ${{ job.status }} from the build job
  • Replaced needs.build.outputs.job_status == 'success' with needs.build.result == 'success' in publish-to-container-registry
  • Replaced needs.build.outputs.job_status == 'failure' with needs.build.result == 'failure' in revert-version-bump

Behavior is identical — this is a pure refactor with no functional change.

The build job in build-plugin-zip.yml was exposing job.status as a
custom output to communicate success/failure to downstream jobs.
GitHub Actions natively provides this through needs.<job_id>.result,
which is simpler and avoids introducing a custom output that could
mask the native context or introduce bugs.

Fixes WordPress#78203

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Gilmoursa
Gilmoursa requested a review from desrosj as a code owner May 14, 2026 22:41
@github-actions

github-actions Bot commented May 14, 2026 •

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: Gilmoursa <gilmoursa@git.wordpress.org>
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 github-actions Bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label May 14, 2026
@github-actions

Copy link
Copy Markdown

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @Gilmoursa! In case you missed it, we'd love to have you join us in our Slack community.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@Gilmoursa

Copy link
Copy Markdown
Author

Could a maintainer please add the [Type] Build Tooling label? Thanks!

@desrosj desrosj added [Type] Build Tooling Issues or PRs related to build tooling props-bot Manually triggers Props Bot to ensure the list of props is up to date. labels May 15, 2026
@github-actions github-actions Bot removed the props-bot Manually triggers Props Bot to ensure the list of props is up to date. label May 15, 2026

@desrosj desrosj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for this, @Gilmoursa! This looks good, but I am going to close this out as a duplicate of #78208 as that PR was opened first and the 2 are identical.

But don't worry, you'll still receive props!

@desrosj

desrosj commented May 15, 2026

Copy link
Copy Markdown
Member

Duplicage of #78208.

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

Labels

First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove custon job_status ouput in favor of the native needs.<job_id>.result

2 participants