mirror of
https://github.com/Snigdha-OS/snigdhaos-assets.git
synced 2025-09-21 20:15:00 +02:00
🐞 fix(workflows): conventional commit
This commit is contained in:
32
.github/workflows/commitizen.yml
vendored
32
.github/workflows/commitizen.yml
vendored
@@ -1,33 +1,27 @@
|
|||||||
name: Commitizen Check on Push and Pull
|
name: Conventional Commit Check
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master # Adjust to match your main branch name
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
commitizen_check:
|
check-commits:
|
||||||
name: Check Commitizen Commit on Push
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: "14"
|
node-version: '16'
|
||||||
|
|
||||||
- name: Install Commitizen
|
- name: Install dependencies
|
||||||
run: npm install -g commitizen
|
run: npm install # Ensure to have npm dependencies set up
|
||||||
|
|
||||||
- name: Verify Commitizen Commit
|
- name: Run commit script
|
||||||
run: |
|
run: bash ./push.sh
|
||||||
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."
|
# You can add additional steps here for testing, linting, etc.
|
||||||
exit 1
|
|
||||||
fi
|
|
Reference in New Issue
Block a user