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 1717 workflow_dispatch :
1818
1919jobs :
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+
2048 lint :
2149 runs-on : ubuntu-latest
2250
You can’t perform that action at this time.
0 commit comments