Skip to content

Commit 3f6b1ce

Browse files
Cancel outades pipeline runs
1 parent d9e7dc4 commit 3f6b1ce

9 files changed

Lines changed: 47 additions & 2 deletions

.github/workflows/kics.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ on:
1414
- debug
1515
pull_request:
1616
merge_group:
17-
schedule:
18-
- cron: '15 6 * * 4'
17+
18+
# Cancel outdated pipeline runs when a new push occurs in the pull request and a new pipeline starts.
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.ref }}
21+
cancel-in-progress: true
22+
1923
jobs:
2024
security_scan:
2125
if: github.event.pull_request.draft == false

.github/workflows/test_linting.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ on:
1818
required: true
1919
type: string
2020

21+
# Cancel outdated pipeline runs when a new push occurs in the pull request and a new pipeline starts.
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.ref }}
24+
cancel-in-progress: true
25+
2126
jobs:
2227
lint:
2328
if: github.event.pull_request.draft == false

.github/workflows/test_plugins.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ on:
1919
- 'molecule/plugins/**'
2020
- '.github/workflows/test_plugins.yml'
2121

22+
# Cancel outdated pipeline runs when a new push occurs in the pull request and a new pipeline starts.
23+
concurrency:
24+
group: ${{ github.workflow }}-${{ github.ref }}
25+
cancel-in-progress: true
26+
2227
jobs:
2328
sanity_core_2_18_2_19:
2429
if: github.event.pull_request.draft == false

.github/workflows/test_role_beats.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ on:
1818
- '.github/workflows/test_role_beats.yml'
1919
- 'molecule/beats_**'
2020

21+
# Cancel outdated pipeline runs when a new push occurs in the pull request and a new pipeline starts.
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.ref }}
24+
cancel-in-progress: true
25+
2126
jobs:
2227
lint_beats:
2328
if: github.event.pull_request.draft == false

.github/workflows/test_role_elasticsearch.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ on:
1818
- '.github/workflows/test_role_elasticsearch.yml'
1919
- 'molecule/elasticsearch_**'
2020

21+
concurrency:
22+
group: ${{ github.workflow }}-${{ github.ref }}
23+
cancel-in-progress: true
24+
2125
jobs:
2226
lint_elasticsearch:
2327
if: github.event.pull_request.draft == false

.github/workflows/test_role_kibana.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ on:
1818
- '.github/workflows/test_role_kibana.yml'
1919
- 'molecule/kibana_**'
2020

21+
# Cancel outdated pipeline runs when a new push occurs in the pull request and a new pipeline starts.
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.ref }}
24+
cancel-in-progress: true
25+
2126
jobs:
2227
lint_kibana:
2328
if: github.event.pull_request.draft == false

.github/workflows/test_role_logstash.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ on:
1818
- '.github/workflows/test_role_logstash.yml'
1919
- 'molecule/logstash_**'
2020

21+
# Cancel outdated pipeline runs when a new push occurs in the pull request and a new pipeline starts.
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.ref }}
24+
cancel-in-progress: true
25+
2126
jobs:
2227
lint_logstash:
2328
if: github.event.pull_request.draft == false

.github/workflows/test_role_repos.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ on:
1717
- '.github/workflows/test_role_repos.yml'
1818
- 'molecule/repos_**'
1919

20+
# Cancel outdated pipeline runs when a new push occurs in the pull request and a new pipeline starts.
21+
concurrency:
22+
group: ${{ github.workflow }}-${{ github.ref }}
23+
cancel-in-progress: true
24+
2025
jobs:
2126
lint_repos:
2227
if: github.event.pull_request.draft == false

.github/workflows/test_roles_pr.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ on:
2323
- '.github/workflows/test_roles_pr.yml'
2424
merge_group:
2525

26+
# Cancel outdated pipeline runs when a new push occurs in the pull request and a new pipeline starts.
27+
# The merge queue is not affected because each merge attempt uses a new temporary branch with a unique name,
28+
# so github.ref is different each time.
29+
concurrency:
30+
group: ${{ github.workflow }}-${{ github.ref }}
31+
cancel-in-progress: true
32+
2633
jobs:
2734
lint_collection:
2835
if: github.event.pull_request.draft == false

0 commit comments

Comments
 (0)