ci: run commitlint action on PRs only

This commit is contained in:
Christopher Willis-Ford 2023-11-20 08:10:57 -08:00
parent 6192ffed75
commit 62f23e8dab
2 changed files with 14 additions and 2 deletions

View file

@ -22,8 +22,7 @@ jobs:
TRIGGER_DEPLOY: ${{ startsWith(github.ref, 'refs/heads/master') }}
steps:
- uses: actions/checkout@v4
- uses: wagoid/commitlint-github-action@v5
if: github.event_name == 'pull_request'
- uses: actions/setup-node@v3
with:
cache: "npm"

13
.github/workflows/commitlint.yml vendored Normal file
View file

@ -0,0 +1,13 @@
name: Lint commit messages
on: [pull_request]
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true
jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: wagoid/commitlint-github-action@v5