From d3a32e8369b0e6e94d5de4323e92b6674b423de3 Mon Sep 17 00:00:00 2001 From: Sankeerth Date: Thu, 1 Aug 2024 13:01:35 +0530 Subject: [PATCH] chore: cancel already existing workflows on pull request update (#3623) --- .github/workflows/build-pr-artifacts.yml | 4 ++++ .github/workflows/check-pr-title.yml | 4 ++++ .github/workflows/commitlint.yml | 4 ++++ .github/workflows/component-test-report.yml | 4 ++++ .github/workflows/dt-test-and-report-code-coverage.yml | 4 ++++ .github/workflows/prepare-for-dev-deploy.yml | 4 ++++ .github/workflows/prepare-for-prod-dt-deploy.yml | 4 ++++ .github/workflows/prepare-for-prod-ut-deploy.yml | 4 ++++ .github/workflows/prepare-for-staging-deploy.yml | 4 ++++ .github/workflows/ut-tests.yml | 4 ++++ .github/workflows/verify-server-start.yml | 4 ++++ .github/workflows/verify.yml | 4 ++++ 12 files changed, 48 insertions(+) diff --git a/.github/workflows/build-pr-artifacts.yml b/.github/workflows/build-pr-artifacts.yml index 9938563bf0..f6aaa18940 100644 --- a/.github/workflows/build-pr-artifacts.yml +++ b/.github/workflows/build-pr-artifacts.yml @@ -7,6 +7,10 @@ on: - reopened - synchronize +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.sha }} + cancel-in-progress: true + jobs: generate-tag-names: runs-on: ubuntu-latest diff --git a/.github/workflows/check-pr-title.yml b/.github/workflows/check-pr-title.yml index 48098e276c..74c96d70ad 100644 --- a/.github/workflows/check-pr-title.yml +++ b/.github/workflows/check-pr-title.yml @@ -8,6 +8,10 @@ on: - reopened - synchronize +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.sha }} + cancel-in-progress: true + jobs: check-pr-title: name: Check PR Title diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index 1e8889c011..7f6d068e15 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -2,6 +2,10 @@ name: Commitlint on: [push] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.sha }} + cancel-in-progress: true + jobs: commitlint: runs-on: ubuntu-latest diff --git a/.github/workflows/component-test-report.yml b/.github/workflows/component-test-report.yml index 936ec53742..02df1478d4 100644 --- a/.github/workflows/component-test-report.yml +++ b/.github/workflows/component-test-report.yml @@ -7,6 +7,10 @@ on: - reopened - synchronize +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.sha }} + cancel-in-progress: true + permissions: id-token: write # allows the JWT to be requested from GitHub's OIDC provider contents: read # This is required for actions/checkout diff --git a/.github/workflows/dt-test-and-report-code-coverage.yml b/.github/workflows/dt-test-and-report-code-coverage.yml index c3fc6150a6..755eb24397 100644 --- a/.github/workflows/dt-test-and-report-code-coverage.yml +++ b/.github/workflows/dt-test-and-report-code-coverage.yml @@ -8,6 +8,10 @@ on: pull_request: types: ['opened', 'reopened', 'synchronize'] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.sha }} + cancel-in-progress: true + jobs: coverage: name: Code Coverage diff --git a/.github/workflows/prepare-for-dev-deploy.yml b/.github/workflows/prepare-for-dev-deploy.yml index 9eb705aa52..66020feef0 100644 --- a/.github/workflows/prepare-for-dev-deploy.yml +++ b/.github/workflows/prepare-for-dev-deploy.yml @@ -10,6 +10,10 @@ on: branches: - develop +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.sha }} + cancel-in-progress: true + jobs: report-coverage: name: Report Code Coverage diff --git a/.github/workflows/prepare-for-prod-dt-deploy.yml b/.github/workflows/prepare-for-prod-dt-deploy.yml index fedbac8ba1..4a4d656e78 100644 --- a/.github/workflows/prepare-for-prod-dt-deploy.yml +++ b/.github/workflows/prepare-for-prod-dt-deploy.yml @@ -10,6 +10,10 @@ on: branches: - main +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.sha }} + cancel-in-progress: true + jobs: report-coverage: name: Report Code Coverage diff --git a/.github/workflows/prepare-for-prod-ut-deploy.yml b/.github/workflows/prepare-for-prod-ut-deploy.yml index a6f7271d9c..a5afed6dee 100644 --- a/.github/workflows/prepare-for-prod-ut-deploy.yml +++ b/.github/workflows/prepare-for-prod-ut-deploy.yml @@ -10,6 +10,10 @@ on: branches: - main +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.sha }} + cancel-in-progress: true + jobs: report-coverage: name: Report Code Coverage diff --git a/.github/workflows/prepare-for-staging-deploy.yml b/.github/workflows/prepare-for-staging-deploy.yml index 46cd731d19..4a4bf44f75 100644 --- a/.github/workflows/prepare-for-staging-deploy.yml +++ b/.github/workflows/prepare-for-staging-deploy.yml @@ -9,6 +9,10 @@ on: branches: - main +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.sha }} + cancel-in-progress: true + jobs: generate-tag-names: runs-on: ubuntu-latest diff --git a/.github/workflows/ut-tests.yml b/.github/workflows/ut-tests.yml index 87e7d1fde8..2f2f303219 100644 --- a/.github/workflows/ut-tests.yml +++ b/.github/workflows/ut-tests.yml @@ -7,6 +7,10 @@ on: - reopened - synchronize +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.sha }} + cancel-in-progress: true + jobs: ut_tests: name: UT Tests diff --git a/.github/workflows/verify-server-start.yml b/.github/workflows/verify-server-start.yml index 332434c817..f87ed57eb8 100644 --- a/.github/workflows/verify-server-start.yml +++ b/.github/workflows/verify-server-start.yml @@ -4,6 +4,10 @@ on: pull_request: types: ['opened', 'reopened', 'synchronize'] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.sha }} + cancel-in-progress: true + jobs: check-health: runs-on: ubuntu-latest diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 1ae1caee23..a03037d4ad 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -3,6 +3,10 @@ name: Verify on: pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.sha }} + cancel-in-progress: true + jobs: formatting-lint: name: Check for formatting & lint errors