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:
|
repository_dispatch:
|
||||||
types: [payload_update]
|
types: [payload_update]
|
||||||
jobs:
|
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:
|
build:
|
||||||
|
needs: cancel
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Trigger build
|
- name: Trigger build
|
||||||
@ -14,5 +26,4 @@ jobs:
|
|||||||
key: ${{ secrets.KEY }}
|
key: ${{ secrets.KEY }}
|
||||||
script: |
|
script: |
|
||||||
cd ${{ secrets.PATH }}
|
cd ${{ secrets.PATH }}
|
||||||
git pull
|
|
||||||
yarn prod astro
|
yarn prod astro
|
||||||
|
Loading…
Reference in New Issue
Block a user