Skip to content

Commit

Permalink
Cancel previous runs before triggering build
Browse files Browse the repository at this point in the history
  • Loading branch information
mooxl committed Jun 26, 2023
1 parent 389dee9 commit eded296
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/payload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -14,5 +26,4 @@ jobs:
key: ${{ secrets.KEY }}
script: |
cd ${{ secrets.PATH }}
git pull
yarn prod astro

0 comments on commit eded296

Please sign in to comment.