Skip to content

Commit 0661c27

Browse files
committed
ci: Fix fetch
1 parent c011204 commit 0661c27

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/test.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,34 @@ jobs:
4545
- name: test build
4646
run: go build -o convcommitlint
4747

48+
- uses: actions/upload-artifact@v4
49+
with:
50+
name: convcommitlint
51+
path: convcommitlint
52+
53+
54+
check-commits:
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@v4
58+
with:
59+
fetch-depth: ${{ inputs.fetch-depth }}
60+
ref: ${{ github.head_ref }}
61+
62+
- name: 'get base branch last commit'
63+
run: git fetch origin ${{ inputs.base-branch }}:${{ inputs.base-branch }} --depth 1
64+
shell: bash
65+
if: ${{ github.ref_name != inputs.base-branch }}
66+
67+
- uses: actions/download-artifact@v4
68+
with:
69+
name: convcommitlint
70+
71+
- name: chmod +x
72+
run: chmod +x convcommitlint
73+
4874
- name: check commits
4975
run: ./convcommitlint -b main --create-review="true" --comment-drafts="false"
5076
env:
5177
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78+

0 commit comments

Comments
 (0)