Skip to content

Commit

Permalink
πŸ’š fix ci for branch naming
Browse files Browse the repository at this point in the history
  • Loading branch information
Aboudjem committed Nov 29, 2023
1 parent 1c5157c commit 89b998c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/check_branch_name.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ on:
jobs:
check-branch-name:
runs-on: ubuntu-latest
if: github.event.ref_type == 'branch' && !contains(github.ref, 'refs/heads/main') && !contains(github.ref, 'refs/heads/develop')
if: github.event.ref_type == 'branch' && !contains(github.ref, 'refs/heads/main')
steps:
- name: Check Branch Name
run: |
BRANCH_PREFIX_REGEX="^(features/|fixes/|releases/).+"
BRANCH_PREFIX_REGEX="^(feat/|fix/|release/|chore/).+"
BRANCH_NAME=${GITHUB_REF#refs/heads/}
if [[ ! $BRANCH_NAME =~ $BRANCH_PREFIX_REGEX ]]; then
echo "Invalid branch name: $BRANCH_NAME"
echo "Branch name must start with 'features/', 'fixes/', or 'releases/'."
echo "Branch name must start with 'feat/', 'fix/', 'chore/', or 'release/'."
exit 1
fi

0 comments on commit 89b998c

Please sign in to comment.