Update sync-to-gitea.yml

This commit is contained in:
CJK_mkp
2025-05-31 11:03:21 +08:00
committed by GitHub
parent 551ea2ecfb
commit 21541b80d3
+10 -10
View File
@@ -2,23 +2,23 @@ name: Sync to Gitea
on: on:
push: push:
branches: [ main ] branches: [ main ] # 监听的分支
workflow_dispatch: # 允许手动触发
jobs: jobs:
sync: sync:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout code
uses: actions/checkout@v3 uses: actions/checkout@v4
with:
fetch-depth: 0 # 获取所有历史记录
- name: Push to Gitea - name: Push to Gitea
env: env:
GITEA_REPO: https://gitea.com/CJKmkp/ICC-CE.git GITEA_REPO: ${{ secrets.GITEA_REPO_URL }}
GITEA_TOKEN: 2cd2e3be72be915d738043b44ec53024ac87271c GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: | run: |
git config --global user.name "GitHub Action" git remote add gitea $GITEA_REPO
git config --global user.email "action@github.com"
# 推送代码到 Gitea
git push -u gitea --all git push -u gitea --all
git push -u gitea --tags git push -u gitea --tags