From b15e7138581b720f693bdcc3a38539b9ae790afc Mon Sep 17 00:00:00 2001 From: Jason Couture Date: Mon, 9 Jan 2023 13:37:17 -0500 Subject: [PATCH] Cancel in progress PR builds when a new commit is pushed for that PR --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index db938864..3f9300ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,11 @@ on: schedule: - cron: "40 5 * * *" # every day at 5:40 +# This causes PR pushes to cancel previous builds, but does not impact cron jobs due to use of .ref, which will have the commit. +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: check: name: Check