diff options
author | Mathias Preiner <mathias.preiner@gmail.com> | 2020-09-30 18:17:45 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-30 18:17:45 -0700 |
commit | e145e9f16ca87eaa3955fb4308f8a6fad6bb158d (patch) | |
tree | cbc8f9737af45d27f184cf636723a8a958900ad1 /.github | |
parent | d7f92f70bb8ff221dc3d7cb086e5e2e237dadc67 (diff) |
Add GH action to cancel previous pending/running CI builds. (#5175)
GH introduced a new workflow event pull_request_target that now makes it
possible to cancel builds on the base repository.
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/ci.yml | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e9c217501..8f8f97139 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,15 @@ -on: [push, pull_request] +on: [push, pull_request_target] name: CI jobs: + cancel: + runs-on: ubuntu-latest + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.5.0 + with: + access_token: ${{ github.token }} + build: strategy: matrix: |