From 34f095407447f5018a72e5b35a8837b7da5de4e4 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Fri, 16 Dec 2022 12:12:07 +0100 Subject: [PATCH] ci: Automatically cancel CI runs if we push a new version to the PR We often have a number of changes in flight, and we amend PRs before the previous run completes. This allows us to cancel that prior run, preserving our precious runners. --- .github/workflows/ci.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8771adfc2..ae6b501ea 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,6 +6,10 @@ on: - "master" pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: prebuild: name: Pre-build checks