Skip to content

Commit 1312993

Browse files
committed
CI: further standardise the concurrency settings
1 parent 271c5b9 commit 1312993

File tree

5 files changed

+17
-15
lines changed

5 files changed

+17
-15
lines changed

.github/workflows/config-options.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ on:
1111
- cron: '15 4 * * *'
1212

1313
concurrency:
14-
# Group by workflow and ref; the last component ensures that for pull
15-
# requests, we limit to one concurrent job, but for the default branch we
16-
# don't
17-
group: ${{ github.workflow }}-${{ github.ref }}-${{ (github.ref != github.event.repository.default_branch && !startsWith(github.ref, 'refs/heads/stable-')) || github.run_number }}
14+
# Group by workflow and ref; the last component ensures that for pull requests
15+
# we limit to one concurrent job, but for the main/stable branches we don't
16+
group: ${{ github.workflow }}-${{ github.ref }}-${{ (github.ref != 'main' && !startsWith(github.ref, 'refs/heads/stable-')) || github.run_number }}
1817
# Only cancel intermediate pull request builds
1918
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
2019

.github/workflows/extended.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ on:
1212
- cron: 30 2 * * *
1313

1414
concurrency:
15-
# Group by workflow and ref; the last component ensures that for pull
16-
# requests, we limit to one concurrent job, but for the main branch we don't
17-
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || github.run_number }}
15+
# Group by workflow and ref; the last component ensures that for pull requests
16+
# we limit to one concurrent job, but for the main/stable branches we don't
17+
group: ${{ github.workflow }}-${{ github.ref }}-${{ (github.ref != 'main' && !startsWith(github.ref, 'refs/heads/stable-')) || github.run_number }}
1818
# Only cancel intermediate pull request builds
1919
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
2020

.github/workflows/manual.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ on:
1111
- cron: '33 3 * * *'
1212

1313
concurrency:
14-
# Group by workflow and ref; the last component ensures that for pull
15-
# requests, we limit to one concurrent job, but for the main branch we don't
16-
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || github.run_number }}
14+
# Group by workflow and ref; the last component ensures that for pull requests
15+
# we limit to one concurrent job, but for the main/stable branches we don't
16+
group: ${{ github.workflow }}-${{ github.ref }}-${{ (github.ref != 'main' && !startsWith(github.ref, 'refs/heads/stable-')) || github.run_number }}
1717
# Only cancel intermediate pull request builds
1818
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1919

.github/workflows/standard.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ on:
1111
- cron: '15 3 * * *'
1212

1313
concurrency:
14-
# Group by workflow and ref; the last component ensures that for pull
15-
# requests, we limit to one concurrent job, but for the main branch we don't
16-
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || github.run_number }}
14+
# Group by workflow and ref; the last component ensures that for pull requests
15+
# we limit to one concurrent job, but for the main/stable branches we don't
16+
group: ${{ github.workflow }}-${{ github.ref }}-${{ (github.ref != 'main' && !startsWith(github.ref, 'refs/heads/stable-')) || github.run_number }}
1717
# Only cancel intermediate pull request builds
1818
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1919

.github/workflows/workspaces.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ on:
1515
- cron: '15 3 * * *'
1616

1717
concurrency:
18-
group: ${{ github.workflow }}-${{ github.ref }}
19-
cancel-in-progress: true
18+
# Group by workflow and ref; the last component ensures that for pull requests
19+
# we limit to one concurrent job, but for the main/stable branches we don't
20+
group: ${{ github.workflow }}-${{ github.ref }}-${{ (github.ref != 'main' && !startsWith(github.ref, 'refs/heads/stable-')) || github.run_number }}
21+
# Only cancel intermediate pull request builds
22+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
2023

2124
jobs:
2225
workspaces:

0 commit comments

Comments
 (0)