From 10bd9364bd23eb1b67277cb7ff233992d8778e20 Mon Sep 17 00:00:00 2001 From: jross Date: Wed, 10 Jun 2026 14:08:55 -0600 Subject: [PATCH] ci: fix production deploy skipping when invoked via workflow_call 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 --- .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 e135876e..45f8dd2a 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