Bugfix/updating branch config #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Branch Name Check | |
on: | |
pull_request: | |
branches: | |
- 'develop' | |
push: | |
branches: | |
- 'develop' | |
jobs: | |
check-branch-name: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check Branch Name | |
run: | | |
BRANCH_NAME="${GITHUB_REF#refs/heads/}" | |
if [[ ! "$BRANCH_NAME" =~ ^(feature|bugfix|hotfix)/.+$ ]]; then | |
echo "Branch name '$BRANCH_NAME' does not match the required pattern." | |
exit 1 | |
fi |