Skip to content

Commit

Permalink
CID-1624: Fix branch name validation
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamedlajmileanix committed Nov 21, 2023
1 parent 19e25fa commit e68727c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/gradle-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- name: Check branch name
run: |
if [[ "${{ github.ref }}" == "refs/heads/main" ]] || [[ "${{ github.head_ref }}" == feature/* ]] || [[ "${{ github.head_ref }}" == bug/* ]]; then
if [[ "${{ github.ref }}" == "refs/heads/main" ]] || [[ "${{ github.head_ref }}" =~ ^feature/.*$ ]] || [[ "${{ github.head_ref }}" =~ ^bug/.*$ ]] ; then
echo "Branch naming is correct!"
else
echo "Invalid branch name! Correct format: 'feature/<branch-name>' or 'bug/<branch-name>'"
Expand Down

0 comments on commit e68727c

Please sign in to comment.