GitHub Actions Fork AutoSync
Fork 仓库后定时拉取原项目 Commits
yml
name: Merge-upstream
on:
push:
branches:
- master
schedule:
- cron: 40 16 * * *
jobs:
merge:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
with:
ref: master
fetch-depth: 0
lfs: true
- name: Set git identity
run : |
git config --global user.email "xxx@xxx.com"
git config --global user.name "xxxxx"
- name: Load upstream commits
run: git pull https://github.com/xxxxxx/xxxxxx.git --no-edit --strategy-option ours
- name: Push Commits
env:
DOWNSTREAM_BRANCH: master
run: git push origin $DOWNSTREAM_BRANCH