Create main.yml

This commit is contained in:
Eshan Roy (Eshanized)
2024-05-02 21:14:41 +05:30
committed by GitHub
parent 65f3310e9a
commit d92ee19b9a

30
.github/workflows/main.yml vendored Normal file
View File

@@ -0,0 +1,30 @@
name: Commitizen Check
on:
pull_request:
branches:
- '*'
jobs:
commitizen_check:
name: Check Commitizen Commit
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '14'
- name: Install Commitizen
run: npm install -g commitizen
- name: Verify Commitizen Commit
run: |
if git log --format='%s' ${{ github.event.before }}..${{ github.sha }} | grep -v '^(feat|fix|docs|style|refactor|perf|test|chore)(\(.+\))?: .+'; then
echo "Invalid commit message found. Please use Commitizen convention."
exit 1
fi