Skip to content

自动同步Fork

自动同步Fork #12

Workflow file for this run

name: 自动同步Fork
on:
schedule:
- cron: '0 0 * * *' # 每天午夜运行
workflow_dispatch: # 允许手动触发
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: 配置Git
run: |
git config user.name github-actions
git config user.email [email protected]
- name: 添加上游仓库
run: git remote add upstream https://github.com/kejilion/sh.git
- name: 获取上游更新
run: git fetch upstream
- name: 合并更新
run: git merge upstream/main # 根据实际情况修改分支名
- name: 推送更新
run: git push origin main # 根据实际情况修改分支名