From d31e02c09132769ca5c75842b9c5d9eb17cd40e4 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, 22 Jun 2025 17:12:28 +0800 Subject: [PATCH] Create push2gitee.yml --- .github/workflows/push2gitee.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/push2gitee.yml diff --git a/.github/workflows/push2gitee.yml b/.github/workflows/push2gitee.yml new file mode 100644 index 0000000..1430a73 --- /dev/null +++ b/.github/workflows/push2gitee.yml @@ -0,0 +1,28 @@ +name: Sync to Private Gitee + +on: + schedule: + - cron: '0 1 * * *' # 每天 UTC 1 点(北京时间 9 点) + workflow_dispatch: # 手动触发也可 + +jobs: + sync: + runs-on: ubuntu-latest + + steps: + - name: Checkout GitHub repository + uses: actions/checkout@v3 + + - name: Set Git config + run: | + git config --global user.name "GitHub Actions" + git config --global user.email "actions@github.com" + + - name: Add Gitee private remote + run: | + git remote add gitee http://${{ secrets.GITEE_USERNAME }}:${{ secrets.GITEE_PASSWORD }}@49.235.152.15:3000/zhudongjer/carrot.git + + - name: Force push to Gitee + run: | + git push gitee --force --all + git push gitee --force --tags