From d92ee19b9a29ebeab0c0896ce962a97684f751d7 Mon Sep 17 00:00:00 2001 From: "Eshan Roy (Eshanized)" <148610067+eshanized@users.noreply.github.com> Date: Thu, 2 May 2024 21:14:41 +0530 Subject: [PATCH] Create main.yml --- .github/workflows/main.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..4d38540 --- /dev/null +++ b/.github/workflows/main.yml @@ -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