fix: reset git fetch auth to token
Build and Publish / release (push) Successful in 17s
CI / lint (pull_request) Successful in 1m58s
CI / test (3.12) (push) Successful in 4m21s
CI / lint (push) Successful in 1m22s
CI / test (3.11) (push) Successful in 2m34s
CI / test (3.13) (push) Successful in 3m1s
CI / test (3.12) (pull_request) Successful in 2m17s
CI / test (3.13) (pull_request) Successful in 1m54s
CI / test (3.11) (pull_request) Successful in 3m23s

This commit was merged in pull request #116.
This commit is contained in:
2026-07-27 15:14:34 +02:00
parent 3185811e61
commit bc9094dc6e
+8
View File
@@ -20,6 +20,7 @@ jobs:
with:
ref: ${{ github.ref_name }}
fetch-depth: 0
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v6
@@ -31,6 +32,8 @@ jobs:
git reset --hard ${{ github.sha }}
- name: Evaluate | Verify upstream has NOT changed
shell: bash
env:
MX_GITEA_BOT_TOKEN: ${{ secrets.MX_GITEA_BOT_TOKEN }}
run: |
set +o pipefail
@@ -44,6 +47,11 @@ jobs:
exit 1
fi
# checkout ran with persist-credentials: false, so the remote carries no
# credentials; give it the bot token to reach this private repo.
git remote set-url "${UPSTREAM_BRANCH_NAME%%/*}" \
"https://${MX_GITEA_BOT_TOKEN}@gitea.psi.ch/${{ github.repository }}.git"
git fetch "${UPSTREAM_BRANCH_NAME%%/*}"
if ! UPSTREAM_SHA="$(git rev-parse "$UPSTREAM_BRANCH_NAME")"; then