fix: fetch PR head SHA after shallow clone in CI
CI & Release / Verify simulator (push) Skipped
CI & Release / Trivy scan (push) Skipped
CI & Release / Semantic Release (push) Skipped
CI & Release / Verify simulator (pull_request) Successful in 17s
CI & Release / Trivy scan (pull_request) Successful in 15s
CI & Release / Semantic Release (pull_request) Skipped

Shallow clone only includes default-branch history; pull_request
runs must fetch the event commit before checkout.
This commit is contained in:
2026-07-12 12:54:04 +01:00
parent 1e5854ee0a
commit 1cc2b9a8f2
+2
View File
@@ -25,6 +25,7 @@ jobs:
- name: Checkout
run: |
git clone --depth=50 https://${{ gitea.actor }}:${{ gitea.token }}@git.produktor.io/${{ gitea.repository }}.git .
git fetch --depth=1 origin ${{ gitea.sha }}
git checkout ${{ gitea.sha }}
- name: Install dependencies
@@ -62,6 +63,7 @@ jobs:
- name: Checkout
run: |
git clone --depth=1 https://${{ gitea.actor }}:${{ gitea.token }}@git.produktor.io/${{ gitea.repository }}.git .
git fetch --depth=1 origin ${{ gitea.sha }}
git checkout ${{ gitea.sha }}
- name: Install Trivy