Skip to content

ci: fix production deploy skipping when invoked via workflow_call#712

Merged
jirhiker merged 1 commit into
stagingfrom
ci/fix-workflow-call-deploy-skip
Jun 10, 2026
Merged

ci: fix production deploy skipping when invoked via workflow_call#712
jirhiker merged 1 commit into
stagingfrom
ci/fix-workflow-call-deploy-skip

Conversation

@jirhiker

Copy link
Copy Markdown
Member

Problem

Merging #711 created release v1.1.0 but never deployed it. In run 27302759728 the deploy-production / production-deploy job was skipped.

Cause

A reusable workflow inherits the caller's event context — github.event_name is never workflow_call. So in CD_production.yml:

if: ${{ startsWith((github.event_name == 'workflow_call' && inputs.tag_name) || github.event.release.tag_name, 'v') }}

github.event_name was push, the left side evaluated false, github.event.release.tag_name is empty on a push event, and startsWith('', 'v') → job skipped.

Fix

Drop the event-name check. inputs.tag_name is simply empty when the workflow is triggered by a release event, so || fallback behavior is preserved:

if: ${{ startsWith(inputs.tag_name || github.event.release.tag_name, 'v') }}

Same fix applied to the DEPLOY_TAG env expression.

Notes

  • Must reach the production branch before the next release-please run picks it up (workflow_call resolves the called workflow at the pushed SHA).
  • The release: published fallback path was never affected — re-publishing v1.1.0 from the UI will deploy it with the current code.

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings June 10, 2026 20:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 for production-deploy to select the deploy tag via inputs.tag_name || github.event.release.tag_name.
  • Updates DEPLOY_TAG to use the same simplified fallback logic.
  • Adds an inline note documenting the event-context behavior that caused the skip.

@jirhiker jirhiker merged commit 6b3f096 into staging Jun 10, 2026
10 checks passed
@jirhiker jirhiker deleted the ci/fix-workflow-call-deploy-skip branch June 10, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants