From 3f6b1ce80dece06d1c49e5d9b2be3b3750e9fcc9 Mon Sep 17 00:00:00 2001 From: Afeef Ghannam Date: Wed, 22 Apr 2026 18:42:24 +0200 Subject: [PATCH 1/2] Cancel outades pipeline runs --- .github/workflows/kics.yml | 8 ++++++-- .github/workflows/test_linting.yml | 5 +++++ .github/workflows/test_plugins.yml | 5 +++++ .github/workflows/test_role_beats.yml | 5 +++++ .github/workflows/test_role_elasticsearch.yml | 4 ++++ .github/workflows/test_role_kibana.yml | 5 +++++ .github/workflows/test_role_logstash.yml | 5 +++++ .github/workflows/test_role_repos.yml | 5 +++++ .github/workflows/test_roles_pr.yml | 7 +++++++ 9 files changed, 47 insertions(+), 2 deletions(-) diff --git a/.github/workflows/kics.yml b/.github/workflows/kics.yml index bbb389bf..1aa1ea37 100644 --- a/.github/workflows/kics.yml +++ b/.github/workflows/kics.yml @@ -14,8 +14,12 @@ on: - debug pull_request: merge_group: - schedule: - - cron: '15 6 * * 4' + +# Cancel outdated pipeline runs when a new push occurs in the pull request and a new pipeline starts. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: security_scan: if: github.event.pull_request.draft == false diff --git a/.github/workflows/test_linting.yml b/.github/workflows/test_linting.yml index c8c1497e..f9f0d897 100644 --- a/.github/workflows/test_linting.yml +++ b/.github/workflows/test_linting.yml @@ -18,6 +18,11 @@ on: required: true type: string +# Cancel outdated pipeline runs when a new push occurs in the pull request and a new pipeline starts. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: lint: if: github.event.pull_request.draft == false diff --git a/.github/workflows/test_plugins.yml b/.github/workflows/test_plugins.yml index 8564a82e..b9f2ab1b 100644 --- a/.github/workflows/test_plugins.yml +++ b/.github/workflows/test_plugins.yml @@ -19,6 +19,11 @@ on: - 'molecule/plugins/**' - '.github/workflows/test_plugins.yml' +# Cancel outdated pipeline runs when a new push occurs in the pull request and a new pipeline starts. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: sanity_core_2_18_2_19: if: github.event.pull_request.draft == false diff --git a/.github/workflows/test_role_beats.yml b/.github/workflows/test_role_beats.yml index ecdbe64c..23745c65 100644 --- a/.github/workflows/test_role_beats.yml +++ b/.github/workflows/test_role_beats.yml @@ -18,6 +18,11 @@ on: - '.github/workflows/test_role_beats.yml' - 'molecule/beats_**' +# Cancel outdated pipeline runs when a new push occurs in the pull request and a new pipeline starts. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: lint_beats: if: github.event.pull_request.draft == false diff --git a/.github/workflows/test_role_elasticsearch.yml b/.github/workflows/test_role_elasticsearch.yml index af73ecc3..3703ff9c 100644 --- a/.github/workflows/test_role_elasticsearch.yml +++ b/.github/workflows/test_role_elasticsearch.yml @@ -18,6 +18,10 @@ on: - '.github/workflows/test_role_elasticsearch.yml' - 'molecule/elasticsearch_**' +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: lint_elasticsearch: if: github.event.pull_request.draft == false diff --git a/.github/workflows/test_role_kibana.yml b/.github/workflows/test_role_kibana.yml index dd11e841..cc953439 100644 --- a/.github/workflows/test_role_kibana.yml +++ b/.github/workflows/test_role_kibana.yml @@ -18,6 +18,11 @@ on: - '.github/workflows/test_role_kibana.yml' - 'molecule/kibana_**' +# Cancel outdated pipeline runs when a new push occurs in the pull request and a new pipeline starts. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: lint_kibana: if: github.event.pull_request.draft == false diff --git a/.github/workflows/test_role_logstash.yml b/.github/workflows/test_role_logstash.yml index 011ca4e4..fc122cfb 100644 --- a/.github/workflows/test_role_logstash.yml +++ b/.github/workflows/test_role_logstash.yml @@ -18,6 +18,11 @@ on: - '.github/workflows/test_role_logstash.yml' - 'molecule/logstash_**' +# Cancel outdated pipeline runs when a new push occurs in the pull request and a new pipeline starts. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: lint_logstash: if: github.event.pull_request.draft == false diff --git a/.github/workflows/test_role_repos.yml b/.github/workflows/test_role_repos.yml index 4b9a4bae..bf84f8dd 100644 --- a/.github/workflows/test_role_repos.yml +++ b/.github/workflows/test_role_repos.yml @@ -17,6 +17,11 @@ on: - '.github/workflows/test_role_repos.yml' - 'molecule/repos_**' +# Cancel outdated pipeline runs when a new push occurs in the pull request and a new pipeline starts. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: lint_repos: if: github.event.pull_request.draft == false diff --git a/.github/workflows/test_roles_pr.yml b/.github/workflows/test_roles_pr.yml index 074f4c61..21ec22b3 100644 --- a/.github/workflows/test_roles_pr.yml +++ b/.github/workflows/test_roles_pr.yml @@ -23,6 +23,13 @@ on: - '.github/workflows/test_roles_pr.yml' merge_group: +# Cancel outdated pipeline runs when a new push occurs in the pull request and a new pipeline starts. +# The merge queue is not affected because each merge attempt uses a new temporary branch with a unique name, +# so github.ref is different each time. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: lint_collection: if: github.event.pull_request.draft == false From 9a67d3f53676b963ca16c6c171b5b82d767196e4 Mon Sep 17 00:00:00 2001 From: Afeef Ghannam Date: Wed, 22 Apr 2026 19:02:07 +0200 Subject: [PATCH 2/2] Add missing comment --- .github/workflows/test_role_elasticsearch.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test_role_elasticsearch.yml b/.github/workflows/test_role_elasticsearch.yml index 3703ff9c..bb843606 100644 --- a/.github/workflows/test_role_elasticsearch.yml +++ b/.github/workflows/test_role_elasticsearch.yml @@ -18,6 +18,7 @@ on: - '.github/workflows/test_role_elasticsearch.yml' - 'molecule/elasticsearch_**' +# Cancel outdated pipeline runs when a new push occurs in the pull request and a new pipeline starts. concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true