1、点 Actions → New workflow → set up a workflow yourself

2、粘贴以下内容

      name: Sync Upstream

on:
  workflow_dispatch:  # 手动触发
  schedule:
    - cron: '0 0 * * 0'  # 每周日自动同步(可选)

jobs:
  sync:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
        with:
          fetch-depth: 0
      - name: Add upstream and merge
        # 换成你要同步的上游仓库
        run: |
          git remote add upstream https://github.com/liyao52033668/cloudreve-eo  
          git fetch upstream
          git checkout main
          git merge upstream/master
          git push origin main
    

3、点 Commit changes 保存

4、以后需要同步时,去 Actions 页面点 Run workflow → 立即执行,无需本地操作

声明

作者: liyao

版权:本博客所有文章除特别声明外,均采用CCBY-NC-SA4.O许可协议。转载请注明!