name: Sync to Gitea on: push: branches: [ main ] jobs: sync: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Push to Gitea env: GITEA_REPO: ${{ secrets.GITEA_REPO_URL }} GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} run: | git config --global user.name "GitHub Action" git config --global user.email "action@github.com" # 使用 token 认证的正确格式 git remote add gitea https://gitea.com/CJKmkp/ICC-CE.git # 推送代码到 Gitea git push -u gitea --all git push -u gitea --tags