Skip to content

Sync Fork

Sync Fork #4

Workflow file for this run

name: Sync Fork
on:
schedule:
# 每天同步一次,你可以根据需要调整cron表达式
- cron: '0 0 * * *'
workflow_dispatch: # 允许手动触发
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: main
- name: Setup git user
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
- name: Fetch upstream
run: |
# 替换下面的URL为你想要同步的仓库的URL
git remote add upstream https://github.com/amclubs/am-cf-linklet.git
git fetch upstream
- name: Rebase
run: |
git rebase upstream/master
- name: Push to main
uses: easingthemes/[email protected]
with:
branch: main
force: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}