From 0a5dd159458305168ed31ff4fda0376f36f80464 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Wed, 20 Nov 2024 12:51:20 +0000 Subject: [PATCH] ci: add concurrency groups --- .github/workflows/benchmarks.yml | 5 +++++ .github/workflows/ci.yml | 5 +++++ .github/workflows/metrics.yml | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 8b9abfb5..abf11ce1 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -9,6 +9,11 @@ on: # * is a special character in YAML so you have to quote this string - cron: '0 0 * * 1' +# This allows a subsequently queued workflow run to interrupt previous runs +concurrency: + group: "${{ github.workflow }}" + cancel-in-progress: true + jobs: build: runs-on: ubuntu-latest diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 233fb5ca..6e99a132 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,6 +2,11 @@ name: Node.js CI on: [push, pull_request] +# This allows a subsequently queued workflow run to interrupt previous runs +concurrency: + group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" + cancel-in-progress: true + jobs: dependency-review: name: Dependency Review diff --git a/.github/workflows/metrics.yml b/.github/workflows/metrics.yml index 0359e685..11747f44 100644 --- a/.github/workflows/metrics.yml +++ b/.github/workflows/metrics.yml @@ -6,6 +6,11 @@ on: branches: - master +# This allows a subsequently queued workflow run to interrupt previous runs +concurrency: + group: "${{ github.workflow }}" + cancel-in-progress: true + jobs: build: runs-on: ubuntu-latest