From 8df4131338df93dc45080485b3e38d795e601634 Mon Sep 17 00:00:00 2001 From: Jeroen van den Hout Date: Mon, 25 Sep 2023 15:45:09 +0200 Subject: [PATCH] Cancel workflows when PR or ref is updated --- .github/workflows/preview.yml | 4 ++++ .github/workflows/publish.yaml | 5 +++++ .github/workflows/test.yml | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 12c51a2954a..5cbcc4d63a1 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -10,6 +10,10 @@ on: issue_comment: types: [created] +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: preview: if: | diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 02006635441..3ffbe5d8658 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -4,6 +4,11 @@ on: pull_request: branches: - main + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: publish: strategy: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2b52621c075..89a2eadc342 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,6 +5,11 @@ on: pull_request: branches: - main + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: consistency: runs-on: ubuntu-latest