fix(pr-validation): add head_ref fetch to checkout step (PRI-1588)

The checkout step was missing git fetch for github.head_ref,
causing "unable to read tree" errors on PRs since the PR head SHA
is not on main.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2026-05-16 02:55:04 +00:00
committed by Gandalf the Greybeard [agent]
parent bc728a753a
commit 8a70d36418
+6 -2
View File
@@ -6,12 +6,16 @@ on:
jobs:
validate:
runs-on: runners-privilegedescalation
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v6
run: |
git clone --depth=1 "https://x-access-token:${{ secrets.GITEA_TOKEN }}@git.farh.net/${{ github.repository }}.git" .
git fetch origin "${{ github.base_ref }}" --depth=1
git fetch origin "${{ github.head_ref }}" --depth=1
git checkout "${{ github.sha }}"
- name: Install actionlint
run: |