File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 17
17
workflow_dispatch :
18
18
19
19
jobs :
20
+ commitlint :
21
+ runs-on : ubuntu-latest
22
+ steps :
23
+ - name : Clone repo
24
+ uses : actions/checkout@v4
25
+
26
+ - name : Install NodeJS
27
+ uses : actions/setup-node@v4
28
+ with :
29
+ node-version : 22.12.0
30
+
31
+ - name : Cache npm dependencies
32
+ uses : actions/cache@v4
33
+ with :
34
+ path : ~/.npm
35
+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
36
+
37
+ - name : Install dependencies
38
+ run : npm ci
39
+
40
+ - name : Validate current commit (last commit) with commitlint
41
+ if : github.event_name == 'push'
42
+ run : npx commitlint --last --verbose
43
+
44
+ - name : Validate PR commits with commitlint
45
+ if : github.event_name == 'pull_request'
46
+ run : npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
47
+
20
48
lint :
21
49
runs-on : ubuntu-latest
22
50
You can’t perform that action at this time.
0 commit comments