From bfd0efcbdd04a46d1184bd6d0f78e37286151663 Mon Sep 17 00:00:00 2001 From: Thomas Kosiewski Date: Wed, 19 Feb 2025 12:07:23 +0100 Subject: [PATCH] ci: add concurrency groups to release pipeline Change-Id: I781ce2750eb30729e84430ee2e3855f3259d2eb9 Signed-off-by: Thomas Kosiewski --- .github/workflows/ci.yml | 6 ++++++ .github/workflows/release.yml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca7a43a..ee602d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,12 @@ on: permissions: contents: read +# Cancel in-progress runs for pull requests when developers push +# additional changes +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + jobs: test: name: test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 989cade..d9d2bf6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,6 +9,12 @@ on: permissions: {} +# Cancel in-progress runs for when multiple PRs get merged +# in quickl succession. Ignore this for tag releases though. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ !contains(github.ref, 'tags/')}} + jobs: build: name: Build Coder Desktop