ci: use server URL for checkout on external runners
Some checks failed
Forgejo Release Builder / release (push) Failing after 6m9s

This commit is contained in:
littlecodedragon 2026-05-07 00:16:03 +02:00
parent 232800cab1
commit 2cf613d19f

View file

@ -25,8 +25,10 @@ jobs:
set -euo pipefail
rm -rf .git
git init .
git remote add origin "http://copilot:${FORGEJO_TOKEN}@127.0.0.1:3030/${GITHUB_REPOSITORY}.git"
git fetch --tags --prune --depth=1 origin "${GITHUB_SHA}"
origin_url="${GITHUB_SERVER_URL#https://}"
origin_url="${origin_url#http://}"
git remote add origin "https://copilot:${FORGEJO_TOKEN}@${origin_url}/${GITHUB_REPOSITORY}.git"
git -c http.sslVerify=false fetch --tags --prune --depth=1 origin "${GITHUB_SHA}"
git checkout --force FETCH_HEAD
- name: Set up JDK