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"
22
33on : [pull_request]
44
5+ env :
6+ NODE_VERSION : 14.x
7+
58jobs :
69 lint-commit-message :
710 runs-on : ubuntu-latest
811 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))"
915 - uses : actions/checkout@v2
1016 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
1520 with :
16- node-version : 12.x
21+ node-version : ${{ env.NODE_VERSION }}
1722 - name : Validate commit messages
1823 run : |
1924 echo "::add-matcher::.github/workflows/commit-lint-problem-matcher.json"
You can’t perform that action at this time.
0 commit comments