-
Notifications
You must be signed in to change notification settings - Fork 156
38 lines (31 loc) · 935 Bytes
/
pr-linting.yml
File metadata and controls
38 lines (31 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: PR Linting
permissions:
contents: read
on:
pull_request:
types: [opened, reopened, synchronize]
jobs:
linting:
runs-on: ubuntu-latest
name: MegaLinter Validation
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: MegaLinter
uses: oxsecurity/megalinter/flavors/documentation@v9
commitlint:
runs-on: ubuntu-latest
name: Conventional Commit Validation
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Validate PR commits with commitlint
run: |
npm install --no-save @commitlint/cli @commitlint/config-conventional
npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose