Skip to content

Commit d39911a

Browse files
committed
feat(cidi) Add branch name check
Expexted branches: feature/*, hotfix/*, bugfix/*
1 parent 7a6bd74 commit d39911a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/branch-check.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: "BRANCH NAME CONVENTION CHECK"
2+
on: [push]
3+
jobs:
4+
check-branch-name:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Check branch name
8+
run: |
9+
if [[ ! "$GITHUB_REF" =~ refs/heads/(feature|hotfix|bugfix)/.+ ]]; then
10+
echo "Branch name does not follow the 'feature/*', 'hotfix/*', 'bugfix/*' naming convention."
11+
exit 1
12+
fi

0 commit comments

Comments
 (0)