diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index a547df2..24a521c 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -1,6 +1,7 @@ name: Lint Commit Messages on: + pull_request: push: branches-ignore: - dependabot/** @@ -13,19 +14,5 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4.0.0 - - name: Install Commitlint - run: | - npm install conventional-changelog-conventionalcommits - npm install commitlint@latest - - - name: Validate Current Commit (Last Commit) With Commitlint - if: github.event_name == "push" - run: | - npx commitlint --from HEAD~1 --to HEAD --verbose - - - name: Validate PR Commits With Commitlint - if: github.event_name == "pull_request" - run: - npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ - github.event.pull_request.commits }} --to ${{ - github.event.pull_request.head.sha }} --verbose + - name: Setup and Run Commitlint + uses: wagoid/commitlint-github-action@v5.4.3