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