File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -32,20 +32,36 @@ jobs:
3232 # ===================
3333 # Triggered by: prerelease creation
3434 elif ${{ github.event_name == 'release' && github.event.action == 'prereleased' }}; then
35+ TAG="${{ github.event.release.tag_name }}"
36+
37+ # Skip if tag doesn't start with v10 (this pipeline is for v10 only)
38+ if [[ ! "$TAG" =~ ^v10\. ]]; then
39+ echo "⏭️ Skipping: Tag '$TAG' is not a v10 release. This pipeline handles v10 releases only."
40+ exit 0
41+ fi
42+
3543 echo "RC environment"
3644 echo "tag=v10-rc" >> $GITHUB_OUTPUT
3745 echo "environment=rc" >> $GITHUB_OUTPUT
38- echo "release_tag=${{ github.event.release.tag_name }} " >> $GITHUB_OUTPUT
46+ echo "release_tag=$TAG " >> $GITHUB_OUTPUT
3947
4048 # ===================
4149 # PROD Environment
4250 # ===================
4351 # Triggered by: prerelease promoted to release
4452 elif ${{ github.event_name == 'release' && github.event.action == 'released' }}; then
53+ TAG="${{ github.event.release.tag_name }}"
54+
55+ # Skip if tag doesn't start with v10 (this pipeline is for v10 only)
56+ if [[ ! "$TAG" =~ ^v10\. ]]; then
57+ echo "⏭️ Skipping: Tag '$TAG' is not a v10 release. This pipeline handles v10 releases only."
58+ exit 0
59+ fi
60+
4561 echo "PROD environment"
4662 echo "tag=v10" >> $GITHUB_OUTPUT
4763 echo "environment=prod" >> $GITHUB_OUTPUT
48- echo "release_tag=${{ github.event.release.tag_name }} " >> $GITHUB_OUTPUT
64+ echo "release_tag=$TAG " >> $GITHUB_OUTPUT
4965 fi
5066
5167 validations :
Original file line number Diff line number Diff line change 7979 TAG="${{ github.event.release.tag_name }}"
8080 echo "Tag from prerelease: $TAG"
8181
82+ # Skip if tag doesn't start with v11 (this pipeline is for v11 only)
83+ if [[ ! "$TAG" =~ ^v11\. ]]; then
84+ echo "⏭️ Skipping: Tag '$TAG' is not a v11 release. This pipeline handles v11 releases only."
85+ exit 0
86+ fi
87+
8288 echo "tag=$TAG" >> $GITHUB_OUTPUT
8389 echo "environment=$ENVIRONMENT" >> $GITHUB_OUTPUT
8490 echo "cm_url=$CM_URL" >> $GITHUB_OUTPUT
You can’t perform that action at this time.
0 commit comments