From 474df42717a22ffc5e2f78999a60cd701cf82728 Mon Sep 17 00:00:00 2001 From: jakeross Date: Mon, 6 Jul 2026 16:32:27 -0600 Subject: [PATCH] fix(ci): deploy on inline workflow_call to CD (Production) A called workflow inherits the caller's event context, so `github.event_name` inside CD (Production) is the caller's event (`push` from release-please), never `workflow_call`. The old gate always fell through to the empty `github.event.release.tag_name` on the inline path, so `production-deploy` was skipped whenever release-please invoked the deploy via workflow_call. Gate on `inputs.tag_name` directly (empty on the release path, so `||` still falls through). Same fix already live on staging; mirrors the hotfix-branch fix in #765. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/CD_production.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CD_production.yml b/.github/workflows/CD_production.yml index e135876e1..45f8dd2a8 100644 --- a/.github/workflows/CD_production.yml +++ b/.github/workflows/CD_production.yml @@ -26,13 +26,16 @@ jobs: # (v*.*.*, v*.*.*-*, v*.*.*[a-z]*). startsWith() is a cheap pre-filter; # the "Validate release tag" step enforces the strict regex. The tag comes # from the workflow_call input or, for the release event, the payload. - if: ${{ startsWith((github.event_name == 'workflow_call' && inputs.tag_name) || github.event.release.tag_name, 'v') }} + # NOTE: a called workflow inherits the CALLER's event context, so + # github.event_name is never 'workflow_call' here — inputs.tag_name is + # simply empty when triggered by a release event, so `||` falls through. + if: ${{ startsWith(inputs.tag_name || github.event.release.tag_name, 'v') }} runs-on: ubuntu-latest environment: production env: - DEPLOY_TAG: ${{ (github.event_name == 'workflow_call' && inputs.tag_name) || github.event.release.tag_name }} + DEPLOY_TAG: ${{ inputs.tag_name || github.event.release.tag_name }} steps: - name: Validate release tag matches version pattern