From d744671b86779d3efd7930ab851571895d54da68 Mon Sep 17 00:00:00 2001 From: Andriy Oblivantsev Date: Sun, 12 Jul 2026 12:56:15 +0100 Subject: [PATCH] fix(ci): fetch PR ref on checkout instead of shallow main clone Use gitea.ref (refs/pull/N/head) so verify and scan jobs resolve branch tips without relying on default-branch shallow history. --- .github/workflows/release.yaml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7c92f38..e704cb2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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: |