From 4fc4e13aa14ba56e62847bf01f75b90ccffcba49 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Tue, 30 Sep 2025 14:22:34 +0200 Subject: [PATCH] Gitea: Try create release again --- .gitea/workflows/build_and_test.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/build_and_test.yml b/.gitea/workflows/build_and_test.yml index 5d6090dd..9c4ebbe5 100644 --- a/.gitea/workflows/build_and_test.yml +++ b/.gitea/workflows/build_and_test.yml @@ -148,19 +148,22 @@ jobs: with: lfs: false fetch-depth: 0 - - name: Configure LFS auth for gitea.psi.ch + - name: Configure auth and fetch LFS shell: bash env: GITEA_TOKEN: ${{ secrets.PIP_REPOSITORY_API_TOKEN }} run: | - umask 077 - cat > ~/.netrc </dev/null || printf "__token__:%s" "${GITEA_TOKEN}" | base64)" + git config http.https://gitea.psi.ch/.extraheader "Authorization: Basic ${BASIC_AUTH}" + + # Initialize and fetch LFS with credentials git lfs install --local - git lfs fetch origin "$(git rev-parse --abbrev-ref HEAD || echo HEAD)" + # Fetch only the current ref to reduce surface; fallback to all if needed + CURRENT_REF="$(git rev-parse --abbrev-ref HEAD || echo HEAD)" + git lfs fetch origin "${CURRENT_REF}" || git lfs fetch --all git lfs checkout - name: Create release env: