Create push2gitee.yml

This commit is contained in:
机械小鸽 2025-06-22 17:12:28 +08:00 committed by GitHub
parent 39cc90da5e
commit d31e02c091
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

28
.github/workflows/push2gitee.yml vendored Normal file
View File

@ -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