From 7d3be80a44cfe84db97ebff0055810667371a5e2 Mon Sep 17 00:00:00 2001 From: Ishani Goyal <111218213+Ishani217@users.noreply.github.com> Date: Thu, 9 May 2024 17:22:37 +0530 Subject: [PATCH] [CI]: Add Concurrency Grouping to GitHub Workflows (#1444) * Update automerge-dependabot.yml Signed-off-by: Ishani Goyal <111218213+Ishani217@users.noreply.github.com> * Update codeql-analysis.yml Signed-off-by: Ishani Goyal <111218213+Ishani217@users.noreply.github.com> * Update go.yml Signed-off-by: Ishani Goyal <111218213+Ishani217@users.noreply.github.com> * Update golangci-lint.yml Signed-off-by: Ishani Goyal <111218213+Ishani217@users.noreply.github.com> --------- Signed-off-by: Ishani Goyal <111218213+Ishani217@users.noreply.github.com> --- .github/workflows/automerge-dependabot.yml | 4 ++++ .github/workflows/codeql-analysis.yml | 4 ++++ .github/workflows/go.yml | 4 ++++ .github/workflows/golangci-lint.yml | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/.github/workflows/automerge-dependabot.yml b/.github/workflows/automerge-dependabot.yml index f817bb5..28fd2a9 100644 --- a/.github/workflows/automerge-dependabot.yml +++ b/.github/workflows/automerge-dependabot.yml @@ -1,6 +1,10 @@ name: Dependabot auto-merge on: pull_request +concurrency: + group: ${{ github.workflow }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }} + cancel-in-progress: true + permissions: contents: write pull-requests: write diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 7511fba..07b1de9 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -20,6 +20,10 @@ on: schedule: - cron: '31 21 * * 6' +concurrency: + group: ${{ github.workflow }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }} + cancel-in-progress: true + # Minimal permissions to be inherited by any job that don't declare it's own permissions permissions: contents: read diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 79634e2..fa161c8 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -7,6 +7,10 @@ on: - main - "release-*" +concurrency: + group: ${{ github.workflow }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }} + cancel-in-progress: true + # Minimal permissions to be inherited by any job that don't declare it's own permissions permissions: contents: read diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 22ca516..ef12310 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -12,6 +12,10 @@ on: - ".golangci.yml" pull_request: +concurrency: + group: ${{ github.workflow }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }} + cancel-in-progress: true + permissions: # added using https://github.com/step-security/secure-repo contents: read