From 86f98bdc843b863e342ce75b320db2df4e5d1ddc Mon Sep 17 00:00:00 2001 From: Matthias Diener Date: Thu, 27 Jul 2023 18:01:03 -0500 Subject: [PATCH 1/2] CI: Cancel prior runs when new run for same PR/branch is started --- .github/workflows/ci.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6f7c8769d..a7993ccb4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,7 +6,12 @@ on: branches: main schedule: - cron: '5 0 * * *' - + +# Cancel in progress CI runs when a new run targeting the same PR or branch/tag is triggered. +# https://stackoverflow.com/questions/66335225/how-to-cancel-previous-runs-in-the-pr-when-you-push-new-commitsupdate-the-curre +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true jobs: flake8: From e455d3b0f6ebe361ea15b622e98f7e0f838d2008 Mon Sep 17 00:00:00 2001 From: Matthias Diener Date: Thu, 27 Jul 2023 18:03:12 -0500 Subject: [PATCH 2/2] empty commit to trigger a new CI run