Skip to content

Commit 4f9885d

Browse files
committed
github/workflows: add concurrency section
This adds a concurrency section to the CI builds so that if we update a branch, it will automatically cancel any pending/ongoing builds. This way we don't waste CI resources.
1 parent 572d8f8 commit 4f9885d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
- '@pybricks/**'
99
pull_request:
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
1115
env:
1216
MAKEOPTS: -j2
1317

.github/workflows/format.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ on:
2222
- "tests/**/*.py"
2323
- "tools/**/*.py"
2424

25+
concurrency:
26+
group: ${{ github.workflow }}-${{ github.ref }}
27+
cancel-in-progress: true
28+
2529
jobs:
2630
format:
2731
name: Check code formatting

0 commit comments

Comments
 (0)