31 lines
694 B
YAML
31 lines
694 B
YAML
# yamllint disable rule:line-length
|
|
name: Lint Commits
|
|
|
|
'on':
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: read
|
|
|
|
jobs:
|
|
commitlint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Install commitlint
|
|
run: npm install --save-dev @commitlint/{cli,config-conventional}
|
|
|
|
- name: Validate PR commits
|
|
env:
|
|
COMMITLINT_FROM: ${{ github.event.pull_request.base.sha }}
|
|
COMMITLINT_TO: ${{ github.event.pull_request.head.sha }}
|
|
run: scripts/lint.sh commitlint
|