Skip to content

Commit 5fcf353

Browse files
authored
autocancel CI when new commit is made on a pull request (#429)
1 parent ce1dc02 commit 5fcf353

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.github/workflows/ci-julia-nightly.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ on:
44
branches: [master, main]
55
tags: ["*"]
66
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/') }}
14+
715
env:
816
PYTHON: ~
917
jobs:

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
concurrency:
99
# group by workflow and ref; the last slightly strange component ensures that for pull
1010
# 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.run_number }}
11+
group: ${{ github.workflow }}-${{ github.ref }}-${{ (github.ref != 'refs/heads/master' && github.ref != 'refs/heads/main') || github.run_number }}
1212
# Cancel intermediate builds, but only if it is a pull request build.
1313
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1414

@@ -23,7 +23,7 @@ jobs:
2323
matrix:
2424
version:
2525
- '1'
26-
- '1.9'
26+
- '1.10'
2727
os:
2828
- ubuntu-latest
2929
threads:

0 commit comments

Comments
 (0)