|
|
@ -11,8 +11,7 @@ on: |
|
|
|
- cron: '50 3 * * *' #设置定时任务 |
|
|
|
- cron: '50 3 * * *' #设置定时任务 |
|
|
|
watch: |
|
|
|
watch: |
|
|
|
types: [started] |
|
|
|
types: [started] |
|
|
|
#修改[用户名],设置token并命名为GITHUB_TOKEN,具体方法百度 |
|
|
|
#1.设置secrets并命名为EMAIL,内容为邮箱地址,设置方法百度,不介意邮箱泄露,可以直接将${{ secrets.EMAIL }}替换为邮箱。2.设置用户名 |
|
|
|
#设置secrets,并命名为EMAIL,内容为邮箱地址,设置方法百度,不介意邮箱泄露,可以直接将${{ secrets.EMAIL }}替换为邮箱 |
|
|
|
|
|
|
|
jobs: |
|
|
|
jobs: |
|
|
|
build: |
|
|
|
build: |
|
|
|
runs-on: ubuntu-latest |
|
|
|
runs-on: ubuntu-latest |
|
|
@ -20,6 +19,8 @@ jobs: |
|
|
|
steps: |
|
|
|
steps: |
|
|
|
- name: Checkout |
|
|
|
- name: Checkout |
|
|
|
uses: actions/checkout@v2 |
|
|
|
uses: actions/checkout@v2 |
|
|
|
|
|
|
|
with: |
|
|
|
|
|
|
|
fetch-depth: 0 |
|
|
|
- name: Install git |
|
|
|
- name: Install git |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
sudo apt-get update |
|
|
|
sudo apt-get update |
|
|
@ -28,15 +29,9 @@ jobs: |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
git config --global user.email "${{ secrets.EMAIL }}" |
|
|
|
git config --global user.email "${{ secrets.EMAIL }}" |
|
|
|
git config --global user.name "[用户名]" |
|
|
|
git config --global user.name "[用户名]" |
|
|
|
- name: Download Repository |
|
|
|
|
|
|
|
run: | |
|
|
|
|
|
|
|
git clone https://github.com/[用户名]/legado.git /opt/legado |
|
|
|
|
|
|
|
- name: Update fork |
|
|
|
- name: Update fork |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
cd /opt/legado |
|
|
|
cd /home/runner/work/legado/legado |
|
|
|
git remote -v |
|
|
|
|
|
|
|
git remote rm origin |
|
|
|
|
|
|
|
git remote add origin https://[用户名]:${{ secrets.GITHUB_TOKEN }}@github.com/[用户名]/legado.git |
|
|
|
|
|
|
|
git remote add upstream https://github.com/gedoor/legado.git |
|
|
|
git remote add upstream https://github.com/gedoor/legado.git |
|
|
|
git remote -v |
|
|
|
git remote -v |
|
|
|
git fetch upstream |
|
|
|
git fetch upstream |
|
|
|