From eded296fd8af1196d770db2492ca7ced38e2d45e Mon Sep 17 00:00:00 2001 From: Max Schmidt Date: Tue, 27 Jun 2023 00:06:19 +0200 Subject: [PATCH] Cancel previous runs before triggering build --- .github/workflows/payload.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/payload.yml b/.github/workflows/payload.yml index 15b8cc9..79bdf11 100644 --- a/.github/workflows/payload.yml +++ b/.github/workflows/payload.yml @@ -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