fix: 去掉actions/checkout依赖,改用git clone避免GitHub网络问题
Some checks failed
Release Docs / release (push) Failing after 1s
Some checks failed
Release Docs / release (push) Failing after 1s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,11 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
run: |
|
||||||
|
git clone -b ${GITHUB_REF#refs/tags/} \
|
||||||
|
"https://gitea-actions:${GITEA_TOKEN}@${{ github.server_url }}/${{ github.repository }}.git" .
|
||||||
|
|
||||||
- name: Package docs
|
- name: Package docs
|
||||||
run: |
|
run: |
|
||||||
@@ -30,7 +34,7 @@ jobs:
|
|||||||
API="${{ github.server_url }}/api/v1/repos/${{ github.repository }}"
|
API="${{ github.server_url }}/api/v1/repos/${{ github.repository }}"
|
||||||
AUTH="Authorization: token ${GITEA_TOKEN}"
|
AUTH="Authorization: token ${GITEA_TOKEN}"
|
||||||
|
|
||||||
# Delete existing release for this tag if any (ignore errors)
|
# Delete existing release for this tag if any
|
||||||
EXISTING_ID=$(curl -sf "${API}/releases/tags/${TAG}" -H "$AUTH" 2>/dev/null \
|
EXISTING_ID=$(curl -sf "${API}/releases/tags/${TAG}" -H "$AUTH" 2>/dev/null \
|
||||||
| python3 -c "import sys,json; print(json.load(sys.stdin).get('id',''))" 2>/dev/null || true)
|
| python3 -c "import sys,json; print(json.load(sys.stdin).get('id',''))" 2>/dev/null || true)
|
||||||
if [ -n "$EXISTING_ID" ]; then
|
if [ -n "$EXISTING_ID" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user