Skip to content

Commit

Permalink
[INFRA] Correctly cancel running workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
eseiler committed Oct 18, 2022
1 parent 7c62d1e commit 6b9c63d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

concurrency:
group: linux-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
cancel-in-progress: ${{ github.event_name == 'push' }}

env:
CMAKE_VERSION: 3.15.7
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

concurrency:
group: macos-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
cancel-in-progress: ${{ github.event_name == 'push' }}

env:
CMAKE_VERSION: 3.15.7
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

concurrency:
group: misc-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
cancel-in-progress: ${{ github.event_name == 'push' }}

env:
SHARG_NO_VERSION_CHECK: 1
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/clang_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,21 @@ jobs:
steps:
- name: "Cancel Misc"
run: echo "Cancelling Misc"
cancel_coverage:
name: Cancel Coverage
concurrency:
group: coverage-${{ github.event.pull_request.number }}
cancel-in-progress: true
runs-on: ubuntu-22.04
steps:
- name: "Cancel Coverage"
run: echo "Cancelling Coverage"
lint:
name: clang-format
concurrency:
group: clang-format-${{ github.event.pull_request.number }}
cancel-in-progress: true
needs: [cancel_linux, cancel_macos, cancel_misc, cancel_coverage]
runs-on: ubuntu-22.04
timeout-minutes: 15
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/readme_snippet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
name: Update README
concurrency:
group: readme-snippet-${{ github.ref }}
cancel-in-progress: true
cancel-in-progress: false
runs-on: ubuntu-22.04
timeout-minutes: 15
steps:
Expand Down

0 comments on commit 6b9c63d

Please sign in to comment.