mirror of
https://github.com/Snigdha-OS/Snigdha-OS.github.io.git
synced 2025-09-06 04:35:18 +02:00
fix(workflow): redesigned action
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
name: Snigdha OS Commitizen Check on Push
|
||||
name: Commitizen Check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
commitizen_check:
|
@@ -1,10 +1,12 @@
|
||||
# Sample workflow for building and deploying a Hugo site to GitHub Pages
|
||||
name: Deploy snigdhaos web to page
|
||||
name: Deploy Snigdha OS
|
||||
|
||||
on:
|
||||
# Runs on pushes targeting the default branch
|
||||
push:
|
||||
branches: ["master"]
|
||||
pull_request:
|
||||
branches: ["master"]
|
||||
|
||||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
||||
permissions:
|
@@ -1,30 +0,0 @@
|
||||
name: Snigdha OS Commitizen Check On Pull
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
commitizen_check:
|
||||
name: Check Commitizen Commit on Pull Request
|
||||
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
|
Reference in New Issue
Block a user