From c110ab7a04affbad23d61885d3ca8d8b0081534b Mon Sep 17 00:00:00 2001 From: Neil Vaytet Date: Wed, 8 Feb 2023 16:18:17 +0100 Subject: [PATCH] cancel running workflows if new push to PR --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad75a3c2..eb173e36 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,9 +7,12 @@ on: push: branches: - main - - release pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_number || github.ref }} + cancel-in-progress: true # cancel jobs from previous push + jobs: formatting: name: Formatting and static analysis