Skip to content

Commit 11c2bad

Browse files
committed
CI: replace cancel-outdated-builds with concurrency groupo
1 parent 99e8000 commit 11c2bad

File tree

2 files changed

+11
-24
lines changed

2 files changed

+11
-24
lines changed

.github/workflows/clippy.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,19 @@ env:
2626
NO_FMT_TEST: 1
2727
CARGO_INCREMENTAL: 0
2828

29+
concurrency:
30+
# For a given workflow, if we push to the same PR, cancel all previous builds on that PR.
31+
# If the push is not attached to a PR, we will cancel all builds on the same branch.
32+
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}"
33+
cancel-in-progress: true
34+
2935
jobs:
3036
base:
3137
# NOTE: If you modify this job, make sure you copy the changes to clippy_bors.yml
3238
runs-on: ubuntu-latest
3339

3440
steps:
3541
# Setup
36-
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
37-
with:
38-
github_token: "${{ secrets.github_token }}"
39-
4042
- name: Checkout
4143
uses: actions/checkout@v4
4244

.github/workflows/clippy_bors.yml

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ env:
1212
NO_FMT_TEST: 1
1313
CARGO_INCREMENTAL: 0
1414

15+
concurrency:
16+
# For a given workflow, if we push to the same branch, cancel all previous builds on that branch.
17+
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}"
18+
cancel-in-progress: true
19+
1520
defaults:
1621
run:
1722
shell: bash
@@ -21,10 +26,6 @@ jobs:
2126
runs-on: ubuntu-latest
2227

2328
steps:
24-
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
25-
with:
26-
github_token: "${{ secrets.github_token }}"
27-
2829
- name: Checkout
2930
uses: actions/checkout@v4
3031
with:
@@ -67,10 +68,6 @@ jobs:
6768
# NOTE: If you modify this job, make sure you copy the changes to clippy.yml
6869
steps:
6970
# Setup
70-
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
71-
with:
72-
github_token: "${{ secrets.github_token }}"
73-
7471
- name: Checkout
7572
uses: actions/checkout@v4
7673

@@ -131,10 +128,6 @@ jobs:
131128

132129
steps:
133130
# Setup
134-
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
135-
with:
136-
github_token: "${{ secrets.github_token }}"
137-
138131
- name: Checkout
139132
uses: actions/checkout@v4
140133

@@ -155,10 +148,6 @@ jobs:
155148

156149
steps:
157150
# Setup
158-
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
159-
with:
160-
github_token: "${{ secrets.github_token }}"
161-
162151
- name: Checkout
163152
uses: actions/checkout@v4
164153

@@ -211,10 +200,6 @@ jobs:
211200

212201
steps:
213202
# Setup
214-
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
215-
with:
216-
github_token: "${{ secrets.github_token }}"
217-
218203
- name: Checkout
219204
uses: actions/checkout@v4
220205

0 commit comments

Comments
 (0)