update
Some checks failed
CI / test (push) Failing after 5s

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-05-04 03:59:22 +02:00
parent 0d2c5fbcb6
commit 1bb7084d97
2 changed files with 15 additions and 1 deletions

View File

@@ -31,16 +31,29 @@ jobs:
git --version
- name: Checkout source (native git)
env:
CI_GIT_TOKEN: ${{ secrets.CI_GIT_TOKEN }}
run: |
if [ -z "${CI_GIT_TOKEN:-}" ]; then
echo "Missing secret CI_GIT_TOKEN. Add it in repository Actions secrets."
exit 1
fi
auth_server="${GITHUB_SERVER_URL#https://}"
auth_server="${auth_server#http://}"
remote_url="https://oauth2:${CI_GIT_TOKEN}@${auth_server}/${GITHUB_REPOSITORY}.git"
if [ -n "${GITHUB_WORKSPACE:-}" ]; then
cd "$GITHUB_WORKSPACE"
fi
if [ ! -d .git ]; then
git init
git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
fi
git remote remove origin >/dev/null 2>&1 || true
git remote add origin "$remote_url"
git fetch --depth 1 origin "$GITHUB_SHA"
git checkout --force FETCH_HEAD