carrot/.github/workflows/sync-branches.yml
2025-02-07 08:34:37 +08:00

23 lines
589 B
YAML

name: Sync Branch
on:
schedule:
- cron: '0 10 * * *' # 每天 UTC 10 点运行
workflow_dispatch: # 允许手动触发
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout the main repository
uses: actions/checkout@v3
with:
fetch-depth: 0 # 完整克隆仓库,确保所有历史记录
token: ${{ secrets.GH_TOKEN }} # 访问 GitHub 需要的令牌
- name: Setup Git
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "github-actions@github.com"