From 244b29a87e0a09939b653676210b4fc747c113c8 Mon Sep 17 00:00:00 2001 From: Amisha Singla Date: Mon, 12 Aug 2024 14:54:28 -0500 Subject: [PATCH] Set concurrency to cancel old workflow runs (#465) --- .github/workflows/ci-cd-dev.yml | 4 ++++ .github/workflows/deploy.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/ci-cd-dev.yml b/.github/workflows/ci-cd-dev.yml index 804700fa..38b81ef3 100644 --- a/.github/workflows/ci-cd-dev.yml +++ b/.github/workflows/ci-cd-dev.yml @@ -10,6 +10,10 @@ on: branches: - master +concurrency: + group: ${{ github.workflow }}-${{ github.ref_protected == 'true' && github.sha || github.ref }}-{{ github.event_name }} + cancel-in-progress: true + jobs: pre-commit: runs-on: ubuntu-latest diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index aaf75150..9710b902 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,6 +12,10 @@ on: - dev - prod +concurrency: + group: ${{ github.workflow }}-${{ github.ref_protected == 'true' && github.sha || github.ref }}-{{ github.event_name }} + cancel-in-progress: true + jobs: tests: runs-on: ubuntu-latest