Create 同步release.yml

This commit is contained in:
dlgt7
2023-12-21 20:08:13 +08:00
committed by GitHub
parent 490dae531b
commit 435417c0d5
+28
View File
@@ -0,0 +1,28 @@
name: Merge upstream release→release
on:
# 推送代码后触发
push:
# 定时任务触发,使用 cron 规则,这里默认一小时执行一次
schedule:
- cron: '0 * * * *'
workflow_dispatch:
jobs:
merge:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Merge upstream
run: |
# 使用自己的用户名替换 username
git config --global user.name 'xyzjhe'
git config --global user.email 'lao@gmail.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