File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : CI
22
3- on : [pull_request]
3+ on :
4+ push :
5+ branches :
6+ - ' *' # matches every branch that doesn't contain a '/'
7+ - ' */*' # matches every branch containing a single '/'
8+ - ' **' # matches every branch
9+
10+ # This allows a subsequently queued workflow run to interrupt previous runs
11+ concurrency :
12+ group : ' ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
13+ cancel-in-progress : true
414
515jobs :
616 prettier :
@@ -26,20 +36,11 @@ jobs:
2636 echo "${{steps.prettier-run.outputs.prettier_output}}"
2737
2838 commitlint :
39+ name : Commitlint Check
2940 runs-on : ubuntu-latest
3041 steps :
3142 - uses : actions/checkout@v4
3243 with :
3344 fetch-depth : 0
3445
35- - uses : dafnik/setup-node-pnpm@v3
36- with :
37- install-ignore-scripts : true
38-
39- - name : Validate current commit (last commit) with commitlint
40- if : github.event_name == 'push'
41- run : pnpm exec commitlint --from HEAD~1 --to HEAD --verbose
42-
43- - name : Validate PR commits with commitlint
44- if : github.event_name == 'pull_request'
45- run : pnpm exec commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
46+ - uses : dafnik/commitlint@main
Original file line number Diff line number Diff line change 11# commitlint
22
3- A GitHub action to run commitlint CLI Checks.
3+ A simple GitHub action to run commitlint CLI Checks.
44
55## Usage
66
77``` yml
88jobs :
99 commitlint :
10+ name : Commitlint Check
1011 runs-on : ubuntu-latest
1112 steps :
1213 # For getting the commitlint config
Original file line number Diff line number Diff line change 11name : ' commitlint'
22author : ' Dafnik'
3- description : ' A simple action which runs the commitlint CLI Check '
3+ description : ' A simple GitHub action to run commitlint CLI Checks. '
44branding :
5- icon : ' mail '
5+ icon : ' git-commit '
66 color : ' purple'
77
88inputs :
2121 - name : Validate current commit (last commit) with commitlint
2222 shell : bash
2323 if : github.event_name == 'push'
24- run : npm exec commitlint --from HEAD~1 --to HEAD --verbose
24+ run : commitlint --from HEAD~1 --to HEAD --verbose
2525
2626 - name : Validate PR commits with commitlint
2727 shell : bash
2828 if : github.event_name == 'pull_request'
29- run : npm exec commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
29+ run : commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
You can’t perform that action at this time.
0 commit comments