From e145e9f16ca87eaa3955fb4308f8a6fad6bb158d Mon Sep 17 00:00:00 2001 From: Mathias Preiner Date: Wed, 30 Sep 2020 18:17:45 -0700 Subject: 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. --- .github/workflows/ci.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to '.github/workflows') 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: -- cgit v1.2.3