You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See [`concurrency`](https://docs.github.com/en/actions/using-jobs/using-concurrency) for more information.
The goal was to limit multiple workflow runs on a given PR.
This will cancel previous runs and make the workflows run on the most up-to-date code.
Copy file name to clipboardExpand all lines: .github/workflows/ci-python.yml
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,15 @@ on:
4
4
workflow_call:
5
5
workflow_dispatch:
6
6
7
+
# We set `concurrency` to prevent having this workflow being run on code that is not up-to-date on a PR (a user make multiple push in a quick manner).
8
+
# But on the main branch, we don't want that behavior.
9
+
# Having the workflow run on each merge commit is something we would like, that could help us where a regression was made and missed by previous checks.
10
+
#
11
+
# For that we use `head_ref` that is only defined on `pull-request` and fallback to `run_id` (this is a counter, so it's value is unique between workflow call).
Copy file name to clipboardExpand all lines: .github/workflows/ci-rust.yml
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,15 @@ on:
4
4
workflow_call:
5
5
workflow_dispatch:
6
6
7
+
# We set `concurrency` to prevent having this workflow being run on code that is not up-to-date on a PR (a user make multiple push in a quick manner).
8
+
# But on the main branch, we don't want that behavior.
9
+
# Having the workflow run on each merge commit is something we would like, that could help us where a regression was made and missed by previous checks.
10
+
#
11
+
# For that we use `head_ref` that is only defined on `pull-request` and fallback to `run_id` (this is a counter, so it's value is unique between workflow call).
Copy file name to clipboardExpand all lines: .github/workflows/ci-web.yml
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,15 @@ on:
4
4
workflow_call:
5
5
workflow_dispatch:
6
6
7
+
# We set `concurrency` to prevent having this workflow being run on code that is not up-to-date on a PR (a user make multiple push in a quick manner).
8
+
# But on the main branch, we don't want that behavior.
9
+
# Having the workflow run on each merge commit is something we would like, that could help us where a regression was made and missed by previous checks.
10
+
#
11
+
# For that we use `head_ref` that is only defined on `pull-request` and fallback to `run_id` (this is a counter, so it's value is unique between workflow call).
Copy file name to clipboardExpand all lines: .github/workflows/ci.yml
+9-1Lines changed: 9 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,16 @@ on:
8
8
branches:
9
9
- master
10
10
11
-
jobs:
11
+
# We set `concurrency` to prevent having this workflow being run on code that is not up-to-date on a PR (a user make multiple push in a quick manner).
12
+
# But on the main branch, we don't want that behavior.
13
+
# Having the workflow run on each merge commit is something we would like, that could help us where a regression was made and missed by previous checks.
14
+
#
15
+
# For that we use `head_ref` that is only defined on `pull-request` and fallback to `run_id` (this is a counter, so it's value is unique between workflow call).
Copy file name to clipboardExpand all lines: .github/workflows/codeql.yml
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,15 @@ on:
13
13
# Every Wednesday at 04:20
14
14
- cron: 20 4 * * 3
15
15
16
+
# We set `concurrency` to prevent having this workflow being run on code that is not up-to-date on a PR (a user make multiple push in a quick manner).
17
+
# But on the main branch, we don't want that behavior.
18
+
# Having the workflow run on each merge commit is something we would like, that could help us where a regression was made and missed by previous checks.
19
+
#
20
+
# For that we use `head_ref` that is only defined on `pull-request` and fallback to `run_id` (this is a counter, so it's value is unique between workflow call).
Copy file name to clipboardExpand all lines: .github/workflows/cspell.yml
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,15 @@ on:
4
4
workflow_call:
5
5
workflow_dispatch:
6
6
7
+
# We set `concurrency` to prevent having this workflow being run on code that is not up-to-date on a PR (a user make multiple push in a quick manner).
8
+
# But on the main branch, we don't want that behavior.
9
+
# Having the workflow run on each merge commit is something we would like, that could help us where a regression was made and missed by previous checks.
10
+
#
11
+
# For that we use `head_ref` that is only defined on `pull-request` and fallback to `run_id` (this is a counter, so it's value is unique between workflow call).
Copy file name to clipboardExpand all lines: .github/workflows/package-ci.yml
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,15 @@ on:
15
15
tags:
16
16
- v[0-9]+.[0-9]+.[0-9]+*
17
17
18
+
# We set `concurrency` to prevent having this workflow being run on code that is not up-to-date on a PR (a user make multiple push in a quick manner).
19
+
# But on the main branch, we don't want that behavior.
20
+
# Having the workflow run on each merge commit is something we would like, that could help us where a regression was made and missed by previous checks.
21
+
#
22
+
# For that we use `head_ref` that is only defined on `pull-request` and fallback to `run_id` (this is a counter, so it's value is unique between workflow call).
0 commit comments