Skip to content

Commit 8390db3

Browse files
emdnetoxrmx
andauthored
infra(ci): configure concurrency to cancel stale runs and setting timeouts (#3422)
Signed-off-by: emdneto <[email protected]> Co-authored-by: Riccardo Magliocchetti <[email protected]>
1 parent b8018c5 commit 8390db3

File tree

10 files changed

+858
-0
lines changed

10 files changed

+858
-0
lines changed

.github/workflows/core_contrib_test_0.yml

Lines changed: 100 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/generate_workflows_lib/src/generate_workflows_lib/core_contrib_test.yml.j2

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ on:
1212
CONTRIB_REPO_SHA:
1313
required: true
1414
type: string
15+
16+
concurrency:
17+
group: ${% raw %}{{ github.workflow }}-${{ github.head_ref || github.run_id }}{% endraw %}
18+
cancel-in-progress: true
19+
1520
env:
1621
CORE_REPO_SHA: ${% raw %}{{ inputs.CORE_REPO_SHA }}{% endraw %}
1722
CONTRIB_REPO_SHA: ${% raw %}{{ inputs.CONTRIB_REPO_SHA }}{% endraw %}
@@ -23,6 +28,7 @@ jobs:
2328
{{ job_data.tox_env }}:
2429
name: {{ job_data.ui_name }}
2530
runs-on: ubuntu-latest
31+
timeout-minutes: 30
2632
steps:
2733
- name: Checkout contrib repo @ SHA - ${% raw %}{{ env.CONTRIB_REPO_SHA }}{% endraw %}
2834
uses: actions/checkout@v4

.github/workflows/generate_workflows_lib/src/generate_workflows_lib/lint.yml.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
- 'release/*'
1010
pull_request:
1111

12+
concurrency:
13+
group: ${% raw %}{{ github.workflow }}-${{ github.head_ref || github.run_id }}{% endraw %}
14+
cancel-in-progress: true
15+
1216
env:
1317
CORE_REPO_SHA: main
1418
CONTRIB_REPO_SHA: main
@@ -20,6 +24,7 @@ jobs:
2024
{{ job_data.name }}:
2125
name: {{ job_data.ui_name }}
2226
runs-on: ubuntu-latest
27+
timeout-minutes: 30
2328
steps:
2429
- name: Checkout repo @ SHA - ${% raw %}{{ github.sha }}{% endraw %}
2530
uses: actions/checkout@v4

.github/workflows/generate_workflows_lib/src/generate_workflows_lib/misc.yml.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
- 'release/*'
1010
pull_request:
1111

12+
concurrency:
13+
group: ${% raw %}{{ github.workflow }}-${{ github.head_ref || github.run_id }}{% endraw %}
14+
cancel-in-progress: true
15+
1216
env:
1317
CORE_REPO_SHA: main
1418
CONTRIB_REPO_SHA: main
@@ -20,6 +24,7 @@ jobs:
2024
{{ job_data }}:
2125
name: {{ job_data }}
2226
runs-on: ubuntu-latest
27+
timeout-minutes: 30
2328
{%- if job_data == "generate-workflows" %}
2429
if: |
2530
!contains(github.event.pull_request.labels.*.name, 'Skip generate-workflows')

.github/workflows/generate_workflows_lib/src/generate_workflows_lib/test.yml.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
- 'release/*'
1010
pull_request:
1111

12+
concurrency:
13+
group: ${% raw %}{{ github.workflow }}-${{ github.head_ref || github.run_id }}{% endraw %}
14+
cancel-in-progress: true
15+
1216
env:
1317
CORE_REPO_SHA: main
1418
CONTRIB_REPO_SHA: main
@@ -20,6 +24,7 @@ jobs:
2024
{{ job_data.name }}:
2125
name: {{ job_data.ui_name }}
2226
runs-on: {{ job_data.os }}
27+
timeout-minutes: 30
2328
steps:
2429
- name: Checkout repo @ SHA - ${% raw %}{{ github.sha }}{% endraw %}
2530
uses: actions/checkout@v4

0 commit comments

Comments
 (0)