Cancel previous runs before triggering build
This commit is contained in:
parent
389dee988f
commit
eded296fd8
13
.github/workflows/payload.yml
vendored
13
.github/workflows/payload.yml
vendored
@ -3,7 +3,19 @@ on:
|
||||
repository_dispatch:
|
||||
types: [payload_update]
|
||||
jobs:
|
||||
cancel:
|
||||
name: Cancel Previous Runs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Cancel Previous Runs
|
||||
uses: styfle/cancel-workflow-action@0.11.0
|
||||
with:
|
||||
ignore_sha: true
|
||||
access_token: ${{ github.token }}
|
||||
workflow_id: "payload.yml"
|
||||
|
||||
build:
|
||||
needs: cancel
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Trigger build
|
||||
@ -14,5 +26,4 @@ jobs:
|
||||
key: ${{ secrets.KEY }}
|
||||
script: |
|
||||
cd ${{ secrets.PATH }}
|
||||
git pull
|
||||
yarn prod astro
|
||||
|
Loading…
Reference in New Issue
Block a user