From 21541b80d392555a26915b9fcea167206d49266f Mon Sep 17 00:00:00 2001 From: CJK_mkp <113243675+CJKmkp@users.noreply.github.com> Date: Sat, 31 May 2025 11:03:21 +0800 Subject: [PATCH] Update sync-to-gitea.yml --- .github/workflows/sync-to-gitea.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/sync-to-gitea.yml b/.github/workflows/sync-to-gitea.yml index 331c4b3d..1ea525e4 100644 --- a/.github/workflows/sync-to-gitea.yml +++ b/.github/workflows/sync-to-gitea.yml @@ -2,23 +2,23 @@ name: Sync to Gitea on: push: - branches: [ main ] + branches: [ main ] # 监听的分支 + workflow_dispatch: # 允许手动触发 jobs: sync: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 - + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 # 获取所有历史记录 + - name: Push to Gitea env: - GITEA_REPO: https://gitea.com/CJKmkp/ICC-CE.git - GITEA_TOKEN: 2cd2e3be72be915d738043b44ec53024ac87271c + 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" - - # 推送代码到 Gitea + git remote add gitea $GITEA_REPO git push -u gitea --all git push -u gitea --tags