Skip to content

Commit

Permalink
update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
dyphire authored and github-actions[bot] committed Feb 15, 2024
1 parent 3c66456 commit e1fc437
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/autoupdatefork.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#更新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

0 comments on commit e1fc437

Please sign in to comment.