-
Notifications
You must be signed in to change notification settings - Fork 111
47 lines (40 loc) · 1.28 KB
/
lint.yml
File metadata and controls
47 lines (40 loc) · 1.28 KB
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
39
40
41
42
43
44
45
46
47
name: lint
on:
merge_group:
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: none
jobs:
cc-commits:
runs-on: ubuntu-22.04
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
- name: Cache npm install
id: cache-node-modules
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
key: node-modules-dev-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('packages/**/package.json') }}
path: |
node_modules
- name: Install debug NPM packages
run: |
npm install -D
- name: Validate PR commits with commitlint
id: cc
env:
COMMITLINT_START_REF: ${{ github.event.pull_request.base.sha || 'HEAD^' }}
COMMITLINT_END_REF: ${{ github.event.pull_request.head.sha || 'HEAD' }}
run: |
node scripts/lint-cc.mjs
- uses: wagoid/commitlint-github-action@b948419dd99f3fd78a6548d48f94e3df7f6bf3ed # v6.2.1