File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : commit-linter
2
+
3
+ on :
4
+ pull_request :
5
+ push :
6
+ branches : [main]
7
+
8
+ jobs :
9
+ commit-lint :
10
+ runs-on : ubuntu-22.04
11
+ steps :
12
+ - uses : actions/checkout@v4
13
+ with :
14
+ fetch-depth : 0
15
+
16
+ - uses : cachix/install-nix-action@v25
17
+ with :
18
+ nix_path : nixpkgs=channel:nixos-unstable
19
+
20
+ - uses : DeterminateSystems/magic-nix-cache-action@main
21
+
22
+ - name : npm install
23
+ run : nix develop --command npm install --include=dev
24
+
25
+ - name : Print versions
26
+ run : |
27
+ git --version
28
+ node --version
29
+ npm --version
30
+ npx commitlint --version
31
+
32
+ - name : Validate current commit (last commit) with commitlint
33
+ if : github.event_name == 'push'
34
+ run : nix develop --command npx commitlint --last --verbose
35
+
36
+ - name : Validate PR commits with commitlint
37
+ if : github.event_name == 'pull_request'
38
+ run : nix develop --command npx 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