From 7233c2e7c7c57ea50365da1e8756f6e6d2347782 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: Sun, 5 Jan 2025 12:54:56 +0800 Subject: [PATCH] Delete .github/workflows/sync-to-gitea.yml --- .github/workflows/sync-to-gitea.yml | 38 ----------------------------- 1 file changed, 38 deletions(-) delete mode 100644 .github/workflows/sync-to-gitea.yml diff --git a/.github/workflows/sync-to-gitea.yml b/.github/workflows/sync-to-gitea.yml deleted file mode 100644 index a370b73..0000000 --- a/.github/workflows/sync-to-gitea.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Sync all branches to Gitea - -on: - push: - branches: - - '*' # 监听所有分支的变化 - -jobs: - sync: - runs-on: ubuntu-latest - - steps: - - name: Checkout GitHub repository - uses: actions/checkout@v3 - - - name: Configure Git - run: | - git config --global user.name "Your Name" - git config --global user.email "your-email@example.com" - - - name: Push all branches to Gitea (force push) - env: - GITEA_URL: '124.220.61.41:5000' # 你的Gitea地址,不带 http:// - GITEA_REPO: 'zhudongjer/openpilot' # Gitea上的仓库名 - GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} # GitHub Secrets中配置的Gitea访问令牌 - run: | - # 获取所有的远程分支 - git fetch --all - - # 遍历每一个分支并推送到Gitea - for branch in $(git branch -r | grep -v '\->'); do - # 获取每个分支的名称 - branch_name=$(echo $branch | sed 's/origin\///') # 去掉 origin/ - git checkout --track $branch - - # 强制推送每个分支到 Gitea,覆盖远程分支 - git push --force http://your_gitea_user:${{ secrets.GITEA_TOKEN }}@${GITEA_URL}/${GITEA_REPO}.git $branch_name:$branch_name - done