ci: fix production deploy skipping when invoked via workflow_call#712
Merged
Conversation
A reusable workflow inherits the caller's event context, so github.event_name is never 'workflow_call' in CD_production. The release-please-invoked deploy therefore fell through to github.event.release.tag_name (empty on push) and the job skipped itself (run 27302759728, v1.1.0 never deployed). Rely on inputs.tag_name being empty outside workflow_call instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a conditional in the production deployment GitHub Actions workflow so that production deploys no longer get skipped when the workflow is invoked as a reusable workflow via workflow_call (where the called workflow inherits the caller’s event context).
Changes:
- Simplifies the
if:gate forproduction-deployto select the deploy tag viainputs.tag_name || github.event.release.tag_name. - Updates
DEPLOY_TAGto use the same simplified fallback logic. - Adds an inline note documenting the event-context behavior that caused the skip.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Merging #711 created release v1.1.0 but never deployed it. In run 27302759728 the
deploy-production / production-deployjob was skipped.Cause
A reusable workflow inherits the caller's event context —
github.event_nameis neverworkflow_call. So inCD_production.yml:github.event_namewaspush, the left side evaluated false,github.event.release.tag_nameis empty on a push event, andstartsWith('', 'v')→ job skipped.Fix
Drop the event-name check.
inputs.tag_nameis simply empty when the workflow is triggered by areleaseevent, so||fallback behavior is preserved:Same fix applied to the
DEPLOY_TAGenv expression.Notes
productionbranch before the next release-please run picks it up (workflow_call resolves the called workflow at the pushed SHA).release: publishedfallback path was never affected — re-publishing v1.1.0 from the UI will deploy it with the current code.🤖 Generated with Claude Code