File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -2,18 +2,23 @@ name: "Commit messages adheres to guidelines at https://goo.gl/p2fr5Q"
2
2
3
3
on : [pull_request]
4
4
5
+ env :
6
+ NODE_VERSION : 14.x
7
+
5
8
jobs :
6
9
lint-commit-message :
7
10
runs-on : ubuntu-latest
8
11
steps :
12
+ - name : Compute number of commits in the PR
13
+ id : nb-of-commits
14
+ run : echo "::set-output name=nb::$((${{ github.event.pull_request.commits }} + 1))"
9
15
- uses : actions/checkout@v2
10
16
with :
11
- # Last 100 commits should be enough for a PR
12
- fetch-depth : 100
13
- - name : Use Node.js 12
14
- uses : actions/setup-node@v1
17
+ fetch-depth : ${{ steps.nb-of-commits.outputs.nb }}
18
+ - name : Use Node.js ${{ env.NODE_VERSION }}
19
+ uses : actions/setup-node@v2
15
20
with :
16
- node-version : 12.x
21
+ node-version : ${{ env.NODE_VERSION }}
17
22
- name : Validate commit messages
18
23
run : |
19
24
echo "::add-matcher::.github/workflows/commit-lint-problem-matcher.json"
You can’t perform that action at this time.
0 commit comments