Skip to content

Commit df40984

Browse files
authored
cancel outdate CI runs
1 parent 65d5482 commit df40984

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
name: CI
22
on:
3-
- push
4-
- pull_request
3+
push:
4+
branches: [master, main]
5+
tags: ["*"]
6+
pull_request:
7+
8+
concurrency:
9+
# group by workflow and ref; the last slightly strange component ensures that for pull
10+
# requests, we limit to 1 concurrent job, but for the master branch we don't
11+
group: ${{ github.workflow }}-${{ github.ref }}-${{ (github.ref != 'refs/heads/master' && github.ref != 'refs/heads/main') || github.run_number }}
12+
# Cancel intermediate builds, but only if it is a pull request build.
13+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
514

615
jobs:
716
test:

0 commit comments

Comments
 (0)