sync release→release #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: sync release→release | |
on: | |
# 推送代码后触发 | |
push: | |
# 定时任务触发,使用 cron 规则,这里默认每天凌晨3点执行一次 | |
schedule: | |
- cron: '0 3 * * *' | |
workflow_dispatch: | |
jobs: | |
merge: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Sync with Upstream | |
run: | | |
# 使用自己的用户名替换 username | |
git config --global user.name 'yf20230412' | |
git config --global user.email 'yufeng1688778@163.com' | |
git pull --unshallow | |
# 自行替换要同步的上游仓库地址 | |
git remote add upstream https://github.com/FongMi/TV.git | |
git fetch upstream | |
git checkout release | |
git merge upstream/release | |
git pull origin release | |
git push origin release |