mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 19:21:10 +00:00
Add GitHub actions check workflow
This commit is contained in:
1 parent
debad9ef74
commit
16f9905bf7
1 file changed
+24
@@ -0,0 +1,24 @@
|
|||||||
|
name: Branch Naming Convention Check
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches-ignore:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-branch-name:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check branch name
|
||||||
|
run: |
|
||||||
|
branch_name=${{ github.ref_name }}
|
||||||
|
if [[ $branch_name == "master" ]]; then
|
||||||
|
echo "Branch is master, skipping check."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
if ! [[ $branch_name =~ ^(feature|bugfix|hotfix|documentation|refactor|other)/ ]]; then
|
||||||
|
echo "Branch name '$branch_name' does not follow the naming convention."
|
||||||
|
echo "It should start with one of: feature/, bugfix/, hotfix/, documentation/, refactor/, or other/"
|
||||||
|
echo "Example: feature/my-feature-name or bugfix/fix-issue-123"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
Reference in new issue
Block a user