Skip to content

Commit deb1a9d

Browse files
authored
Only run CI on latest commit of PR branches (#553)
Same as RustCrypto/traits#1948.
1 parent 9efaa5b commit deb1a9d

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ env:
1010
RUSTFLAGS: "-Dwarnings"
1111
RUSTDOCFLAGS: "-Dwarnings"
1212

13+
# Cancels CI jobs when new commits are pushed to a PR branch
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
16+
cancel-in-progress: true
17+
1318
jobs:
1419
build:
1520
runs-on: ubuntu-latest

.github/workflows/workspace.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ on:
99
paths-ignore:
1010
- README.md
1111

12+
# Cancels CI jobs when new commits are pushed to a PR branch
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
15+
cancel-in-progress: true
16+
1217
jobs:
1318
clippy:
1419
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)