From 91e136dc60c514184cdc640c14e58673d1caebf2 Mon Sep 17 00:00:00 2001 From: Agusrodri Date: Wed, 11 Sep 2024 09:07:32 -0700 Subject: [PATCH] add cancel workflow to CI --- .github/workflows/cancel.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/cancel.yml diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml new file mode 100644 index 0000000..40fb06e --- /dev/null +++ b/.github/workflows/cancel.yml @@ -0,0 +1,14 @@ +name: Cancel +on: [push] +jobs: + cancel: + name: "Cancel Previous Build" + if: github.ref != 'refs/heads/master' + runs-on: ubuntu-latest + timeout-minutes: 3 + steps: + - uses: styfle/cancel-workflow-action@0.9.1 + with: + workflow_id: ".github/workflows/build.yml" + all_but_latest: true + access_token: ${{ github.token }} \ No newline at end of file