From 4d8afe4799b38fca6df8f08500dd2c03a7e13cd6 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Tue, 30 Sep 2025 14:25:07 +0200 Subject: [PATCH] Gitea: Try create release again --- .gitea/workflows/build_and_test.yml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/.gitea/workflows/build_and_test.yml b/.gitea/workflows/build_and_test.yml index 9c4ebbe5..84c8bc60 100644 --- a/.gitea/workflows/build_and_test.yml +++ b/.gitea/workflows/build_and_test.yml @@ -146,25 +146,17 @@ jobs: steps: - uses: actions/checkout@v4 with: - lfs: false - fetch-depth: 0 + persist-credentials: 'true' # Optional; should be the default - name: Configure auth and fetch LFS shell: bash env: GITEA_TOKEN: ${{ secrets.PIP_REPOSITORY_API_TOKEN }} run: | - set -euo pipefail - - # Add Basic Authorization header for gitea.psi.ch - BASIC_AUTH="$(printf "__token__:%s" "${GITEA_TOKEN}" | base64 -w0 2>/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 - # 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 + AUTH=$(git config --local http.${{ github.server_url }}/.extraheader) + git config --local --unset http.${{ github.server_url }}/.extraheader + git config --local http.${{ github.server_url }}/${{ github.repository }}.git/info/lfs/objects/batch.extraheader "$AUTH" + git lfs pull - name: Create release env: GITEA_TOKEN: ${{ secrets.PIP_REPOSITORY_API_TOKEN }}