File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,11 +45,35 @@ jobs:
4545 - name : test build
4646 run : go build -o convcommitlint
4747
48- convcommitlint :
48+ - uses : actions/upload-artifact@v4
49+ with :
50+ name : convcommitlint
51+ path : convcommitlint
52+
53+
54+ check-commits :
4955 runs-on : ubuntu-latest
56+ needs : test
5057 steps :
5158 - uses : actions/checkout@v4
52- - uses : ./
59+ with :
60+ fetch-depth : 0
61+ ref : ${{ github.head_ref }}
62+
63+ - name : ' get base branch last commit'
64+ run : git fetch origin main:main --depth 1
65+ shell : bash
66+ if : ${{ github.ref_name != 'main' }}
67+
68+ - uses : actions/download-artifact@v4
69+ with :
70+ name : convcommitlint
71+
72+ - name : chmod +x
73+ run : chmod +x convcommitlint
74+
75+ - name : check commits
76+ run : ./convcommitlint -b main --create-review="true" --comment-drafts="false"
5377 env :
5478 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5579
You can’t perform that action at this time.
0 commit comments