fix(ci): fetch PR ref on checkout instead of shallow main clone
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 16s
CI & Release / Trivy scan (pull_request) Successful in 15s
CI & Release / Semantic Release (pull_request) Skipped

Use gitea.ref (refs/pull/N/head) so verify and scan jobs resolve
branch tips without relying on default-branch shallow history.
This commit is contained in:
2026-07-12 12:56:15 +01:00
parent 1cc2b9a8f2
commit d744671b86
+8 -6
View File
@@ -24,9 +24,10 @@ jobs:
steps:
- 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 }}
git init .
git remote add origin https://${{ gitea.actor }}:${{ gitea.token }}@git.produktor.io/${{ gitea.repository }}.git
git fetch --depth=50 origin "${{ gitea.ref }}"
git checkout FETCH_HEAD
- name: Install dependencies
run: pip install --quiet -r simulator/requirements.txt
@@ -62,9 +63,10 @@ jobs:
steps:
- 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 }}
git init .
git remote add origin https://${{ gitea.actor }}:${{ gitea.token }}@git.produktor.io/${{ gitea.repository }}.git
git fetch --depth=1 origin "${{ gitea.ref }}"
git checkout FETCH_HEAD
- name: Install Trivy
run: |