Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/CD_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading