fix(pr-validation): fetch PR head refs instead of branch name
Prior --depth=1 fetch of $HEAD_REF fails because shallow clone doesn't bring in the PR head branch as a ref. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
committed by
Gandalf the Greybeard [agent]
parent
b9518df713
commit
2d7f2e1b74
@@ -17,7 +17,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git clone --depth=1 "https://x-access-token:${{ secrets.GITEA_TOKEN }}@git.farh.net/${{ github.repository }}.git" .
|
git clone --depth=1 "https://x-access-token:${{ secrets.GITEA_TOKEN }}@git.farh.net/${{ github.repository }}.git" .
|
||||||
git fetch origin "$BASE_REF" --depth=1
|
git fetch origin "$BASE_REF" --depth=1
|
||||||
git fetch origin "$HEAD_REF" --depth=1
|
git fetch origin +refs/pull/*/head:refs/pull/*/head --depth=1
|
||||||
git checkout "${{ github.sha }}"
|
git checkout "${{ github.sha }}"
|
||||||
|
|
||||||
- name: Install actionlint
|
- name: Install actionlint
|
||||||
|
|||||||
Reference in New Issue
Block a user