28 lines
603 B
YAML
28 lines
603 B
YAML
name: Commit Lint
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [main, dev]
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: read
|
|
|
|
jobs:
|
|
commit-lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
|
|
- name: Install commitlint
|
|
run: npm install -g @commitlint/cli @commitlint/config-conventional
|
|
|
|
- name: Lint commits
|
|
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
|