Skip to content

Commit 80f44bc

Browse files
committed
ci: cancel concurrent jobs for non-master branch
- cancels concurrent jobs whenever a PR has subsequent pushes - jobs associated with `master` branch and `tags` are unaffected by this change i.e they run always.
1 parent b021b92 commit 80f44bc

File tree

4 files changed

+25
-0
lines changed

4 files changed

+25
-0
lines changed

.github/workflows/Documentation.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ on:
77
tags: '*'
88
pull_request:
99

10+
concurrency:
11+
# Skip intermediate builds: always, but for the master branch.
12+
# Cancel intermediate builds: always, but for the master branch.
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: ${{ github.ref != 'refs/heads/master' && github.refs != 'refs/tags/*'}}
15+
1016
jobs:
1117
build:
1218
runs-on: ubuntu-latest

.github/workflows/Downstream.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ on:
77
paths-ignore:
88
- 'docs/**'
99

10+
concurrency:
11+
# Skip intermediate builds: always, but for the master branch and tags.
12+
# Cancel intermediate builds: always, but for the master branch and tags.
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: ${{ github.ref != 'refs/heads/master' && github.refs != 'refs/tags/*' }}
15+
1016
jobs:
1117
test:
1218
name: ${{ matrix.package.repo }}/${{ matrix.package.group }}/${{ matrix.julia-version }}

.github/workflows/FormatCheck.yml

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

11+
concurrency:
12+
# Skip intermediate builds: always, but for the master branch and tags.
13+
# Cancel intermediate builds: always, but for the master branch and tags.
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: ${{ github.ref != 'refs/heads/master' && github.refs != 'refs/tags/*'}}
16+
1117
jobs:
1218
build:
1319
runs-on: ${{ matrix.os }}

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ on:
1010
- master
1111
paths-ignore:
1212
- 'docs/**'
13+
14+
concurrency:
15+
# Skip intermediate builds: always, but for the master branch.
16+
# Cancel intermediate builds: always, but for the master branch.
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
19+
1320
jobs:
1421
test:
1522
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)