Update auto-update.yml
This commit is contained in:
parent
c8a373d318
commit
3303cd7173
21
.github/workflows/auto-update.yml
vendored
21
.github/workflows/auto-update.yml
vendored
@ -4,33 +4,24 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0,12 * * *'
|
- cron: '0 0,12 * * *'
|
||||||
jobs:
|
jobs:
|
||||||
delete-old-branch:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
continue-on-error: true
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
ref: ${{ github.ref }}
|
|
||||||
- name: Delete Branch
|
|
||||||
uses: dawidd6/action-delete-branch@v3
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
branches: 'bot/auto-update'
|
|
||||||
create-branch:
|
create-branch:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: delete-old-branch
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.ref }}
|
ref: ${{ github.ref }}
|
||||||
|
- name: Set Branch Name
|
||||||
|
id: set-branch-name
|
||||||
|
run: echo "::set-output name=branch_name::bot/auto-update"
|
||||||
- name: Create Branch
|
- name: Create Branch
|
||||||
uses: peterjgrainger/action-create-branch@v2.0.1
|
uses: peterjgrainger/action-create-branch@v2.0.1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
branch: 'bot/auto-update'
|
branch: ${{ steps.set-branch-name.outputs.branch_name }}
|
||||||
|
- name: Exit
|
||||||
|
run: exit 1
|
||||||
create-matrix:
|
create-matrix:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: create-branch
|
needs: create-branch
|
||||||
|
Loading…
x
Reference in New Issue
Block a user