2020-08-17 21:51:13 +08:00
|
|
|
#更新fork
|
|
|
|
name: update fork
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
2020-08-22 10:28:53 +08:00
|
|
|
- cron: '0 16 * * *' #设置定时任务
|
|
|
|
|
2020-08-17 21:51:13 +08:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
2020-08-22 10:28:53 +08:00
|
|
|
if: ${{ github.event.repository.owner.id == github.event.sender.id && github.actor != 'gedoor' }}
|
2020-08-17 21:51:13 +08:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2020-08-20 21:24:37 +08:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2020-08-17 21:51:13 +08:00
|
|
|
- name: Install git
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get -y install git
|
2020-08-19 21:28:23 +08:00
|
|
|
- name: Set env
|
|
|
|
run: |
|
2020-08-22 10:28:53 +08:00
|
|
|
git config --global user.email "github-actions@github.com"
|
|
|
|
git config --global user.name "github-actions"
|
2020-08-17 21:51:13 +08:00
|
|
|
- name: Update fork
|
|
|
|
run: |
|
|
|
|
git remote add upstream https://github.com/gedoor/legado.git
|
|
|
|
git remote -v
|
|
|
|
git fetch upstream
|
|
|
|
git checkout master
|
|
|
|
git merge upstream/master
|
|
|
|
git push origin master
|