Skip to content

Commit

Permalink
exit when branch or commit validation fails
Browse files Browse the repository at this point in the history
  • Loading branch information
ShankarSinghC committed Oct 10, 2023
1 parent 4f5a383 commit d6d0889
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/create-hotfix-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ jobs:
shell: bash
run: |
if [[ ${{github.ref}} =~ ^refs/heads/hotfix-[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "::notice::${{github.ref}} is a valid branch."
echo "::notice::${{github.ref}} is a valid branch."
else
echo "::error::${{github.ref}} is not a valid branch."
echo "::error::${{github.ref}} is not a valid branch."
exit 1
fi
- name: Check if the latest commit is tag
Expand All @@ -36,6 +37,7 @@ jobs:
echo "::notice::The latest commit is not a tag "
else
echo "::error::The latest commit on the branch is already a tag"
exit 1
fi
- name: Determine current and next tag
Expand Down

0 comments on commit d6d0889

Please sign in to comment.