🐛 fix(gitea_workflow): clean up temp repos after job steps

This commit is contained in:
csh
2026-05-22 16:42:08 +08:00
parent 2bc3b115dc
commit 25d895d8b3
5 changed files with 21 additions and 5 deletions
+5 -1
View File
@@ -45,7 +45,6 @@ jobs:
mkdir -p "$WORKSPACE_DIR"
REPO_DIR="$(mktemp -d "$WORKSPACE_DIR/${REPO_NAME}.XXXXXX")"
trap 'rm -rf "$REPO_DIR"' EXIT
if [ -n "$TOKEN" ]; then
REPO_URL="https://oauth2:${TOKEN}@${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}.git"
@@ -117,3 +116,8 @@ jobs:
echo "========================================"
sh tests/integration/check_doc_links.sh
- name: 🧹 清理临时仓库
if: always()
run: |
rm -rf "$REPO_DIR"