update fork #1096
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
#更新fork | |
name: update fork | |
on: | |
repository_dispatch: | |
workflow_dispatch: | |
schedule: | |
- cron: '50 7 * * *' #设置定时任务 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.WORKFLOW_TOKEN }} | |
- name: Set env | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
- name: Update fork master | |
run: | | |
git remote add upstream https://github.com/mpv-player/mpv.git | |
git remote -v | |
git fetch upstream | |
git checkout master || git checkout -b master origin/master | |
git merge --strategy-option=ours upstream/master | |
git push -f origin master | |
- name: Update fork patch | |
run: | | |
git checkout patch || git checkout -b patch origin/patch | |
git rebase --strategy-option=ours upstream/master | |
git push -f origin patch |