From 9bec50e8f7a4c5a66462ca0ae3200eda6d735440 Mon Sep 17 00:00:00 2001 From: Andriy Oblivantsev Date: Fri, 10 Jul 2026 10:48:27 +0100 Subject: [PATCH] fix(ci): fetch PR ref on checkout instead of shallow main clone Shallow clone of default branch did not contain commits on feature branches, causing pull_request verify jobs to fail at checkout. --- .github/workflows/release.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ba20cd3..e704cb2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -24,8 +24,10 @@ jobs: steps: - name: Checkout run: | - git clone --depth=50 https://${{ gitea.actor }}:${{ gitea.token }}@git.produktor.io/${{ gitea.repository }}.git . - 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 @@ -61,8 +63,10 @@ jobs: steps: - name: Checkout run: | - git clone --depth=1 https://${{ gitea.actor }}:${{ gitea.token }}@git.produktor.io/${{ gitea.repository }}.git . - 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: |