mirror of
https://github.com/Snigdha-OS/snigdhaos-assets.git
synced 2025-09-22 12:35:02 +02:00
🐞 fix(alt): remove npm
This commit is contained in:
38
.github/workflows/commitizen.yml
vendored
38
.github/workflows/commitizen.yml
vendored
@@ -1,27 +1,35 @@
|
||||
name: Conventional Commit Check
|
||||
name: Check Conventional Commit
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master # Adjust to match your main branch name
|
||||
- main
|
||||
|
||||
jobs:
|
||||
check-commits:
|
||||
check-commit-message:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
- name: Check Conventional Commit
|
||||
run: |
|
||||
# Define the conventional commit types with emojis
|
||||
TYPES=("🎉 feat" "🐞 fix" "📚 docs" "💅 style" "🔨 refactor" "⚡️ perf" "🧪 test" "🛠️ build" "🤖 ci" "🧹 chore" "⏪️ revert")
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install # Ensure to have npm dependencies set up
|
||||
# Extract the commit type and emoji from the commit message
|
||||
COMMIT_MSG=$(git log --format=%B -n 1)
|
||||
for type in "${TYPES[@]}"; do
|
||||
type_emoji=${type}
|
||||
type=${type_emoji#* }
|
||||
emoji=${type_emoji% *}
|
||||
if [[ $COMMIT_MSG == $emoji* ]]; then
|
||||
echo "Commit message is a conventional commit"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Run commit script
|
||||
run: bash ./push.sh
|
||||
|
||||
# You can add additional steps here for testing, linting, etc.
|
||||
# If we reach here, the commit message is not a conventional commit
|
||||
echo "Commit message is not a conventional commit"
|
||||
exit 1
|
Reference in New Issue
Block a user