Skip to content

Commit

Permalink
ci: cancel concurrent jobs for non-master branch
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
ven-k committed Sep 28, 2023
1 parent b021b92 commit 80f44bc
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ on:
tags: '*'
pull_request:

concurrency:
# Skip intermediate builds: always, but for the master branch.
# Cancel intermediate builds: always, but for the master branch.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' && github.refs != 'refs/tags/*'}}

jobs:
build:
runs-on: ubuntu-latest
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/Downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ on:
paths-ignore:
- 'docs/**'

concurrency:
# Skip intermediate builds: always, but for the master branch and tags.
# Cancel intermediate builds: always, but for the master branch and tags.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' && github.refs != 'refs/tags/*' }}

jobs:
test:
name: ${{ matrix.package.repo }}/${{ matrix.package.group }}/${{ matrix.julia-version }}
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/FormatCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ on:
tags: '*'
pull_request:

concurrency:
# Skip intermediate builds: always, but for the master branch and tags.
# Cancel intermediate builds: always, but for the master branch and tags.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' && github.refs != 'refs/tags/*'}}

jobs:
build:
runs-on: ${{ matrix.os }}
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ on:
- master
paths-ignore:
- 'docs/**'

concurrency:
# Skip intermediate builds: always, but for the master branch.
# Cancel intermediate builds: always, but for the master branch.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
test:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 80f44bc

Please sign in to comment.