fix: strip protocol from GITHUB_SERVER_URL for git clone
Check Source / check (push) Successful in 3s
Auto Release / build (push) Failing after 34s
Simple Test / test (push) Successful in 1s
Test Env / test (push) Successful in 1s

This commit is contained in:
test
2026-09-27 13:12:11 +08:00
parent eeecb551bc
commit b11beb7126
+4 -2
View File
@@ -22,9 +22,11 @@ jobs:
- name: Checkout code
run: |
echo "Checking out code..."
GIT_HOST=${GITHUB_SERVER_URL#http://}
GIT_HOST=${GIT_HOST#https://}
rm -rf /workspace/youpaishidifu/Sdf1_login/*
rm -rf /workspace/youpaishidifu/Sdf1_login/.[!.]*
git clone "https://x-access-token:${ACTIONS_RUNTIME_TOKEN}@${GITHUB_SERVER_URL}/$(echo ${GITHUB_REPOSITORY} | tr '[:upper:]' '[:lower:]').git" .
git clone "https://x-access-token:${ACTIONS_RUNTIME_TOKEN}@${GIT_HOST}/$(echo ${GITHUB_REPOSITORY} | tr '[:upper:]' '[:lower:]').git" .
echo "Checkout completed"
- name: Build with Maven
@@ -68,7 +70,7 @@ jobs:
-H "Authorization: token ${RUNNER_TOKEN}" \
-H "Content-Type: application/json" \
"${BASE}/releases" \
-d "{\"tag_name\":\"${TAG}",\"name\":\"${TAG}",\"body\":\"Auto release by Gitea Actions\",\"draft\":false,\"prerelease\":false}"
-d "{"tag_name":"${TAG}","name":"${TAG}","body":"Auto release by Gitea Actions","draft":false,"prerelease":false}"
echo "=== Uploading artifact ==="
JAR=$(ls target/*.jar | head -1)