From 36ede4598949092be3b61418a5141cbe730d1098 Mon Sep 17 00:00:00 2001 From: Harry Mellor <19981378+hmellor@users.noreply.github.com> Date: Wed, 30 Jul 2025 15:18:02 +0100 Subject: [PATCH] Reduce time wasted in GitHub Actions using `concurrency` (#21919) Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> --- .github/workflows/lint-and-deploy.yaml | 4 ++++ .github/workflows/pre-commit.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/lint-and-deploy.yaml b/.github/workflows/lint-and-deploy.yaml index 74a7a3a3530f5..2b1086b7faf43 100644 --- a/.github/workflows/lint-and-deploy.yaml +++ b/.github/workflows/lint-and-deploy.yaml @@ -2,6 +2,10 @@ name: Lint and Deploy Charts on: pull_request +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + permissions: contents: read diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 835e91d91ae94..195579f206a2f 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -5,6 +5,10 @@ on: push: branches: [main] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + permissions: contents: read