From 31de08df32f6eadc2d26e07b310d59fef657e448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=BA=E6=A2=B0=E5=B0=8F=E9=B8=BD?= <128568434+jixiexiaoge@users.noreply.github.com> Date: Sat, 7 Dec 2024 17:39:25 +0800 Subject: [PATCH] Update sync-to-gitea.yml --- .github/workflows/sync-to-gitea.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync-to-gitea.yml b/.github/workflows/sync-to-gitea.yml index d7f0556..e12693c 100644 --- a/.github/workflows/sync-to-gitea.yml +++ b/.github/workflows/sync-to-gitea.yml @@ -20,7 +20,7 @@ jobs: - name: Push all branches to Gitea env: - GITEA_URL: 'http://124.220.61.41:5000' # 你的Gitea地址 + GITEA_URL: '124.220.61.41:5000' # 你的Gitea地址,不带 http:// GITEA_REPO: 'zhudongjer/openpilot' # Gitea上的仓库名 GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} # GitHub Secrets中配置的Gitea访问令牌 run: | @@ -30,5 +30,6 @@ jobs: # 遍历每一个分支并推送到Gitea for branch in $(git branch -r | grep -v '\->'); do git checkout --track $branch - git push https://your_gitea_user:${{ secrets.GITEA_TOKEN }}@${GITEA_URL}/api/v1/repos/${GITEA_REPO}/push HEAD:$branch + # 修复URL中的错误,移除多余的 http:// + git push https://your_gitea_user:${{ secrets.GITEA_TOKEN }}@${GITEA_URL}/${GITEA_REPO}.git HEAD:$branch done