Skip to content

Commit

Permalink
Added concurrency for cancel previous runs
Browse files Browse the repository at this point in the history
  • Loading branch information
mc2eqe committed Sep 22, 2023
1 parent c4ce8f1 commit 833092d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 40 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/base_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,11 @@ on:
tags-ignore:
- v[0-9]+.[0-9]+.[0-9]+*
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
clean-up-actions:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
# Only cancel non-master branch runs
if: ${{ github.ref != 'refs/heads/master' }}
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

compile-and-check:
runs-on: ubuntu-latest
steps:
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,11 @@ on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
workflow_dispatch:
jobs:
clean-up-actions:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
# Only cancel non-master branch runs
if: ${{ github.ref != 'refs/heads/master' }}
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
coverage:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
name: Static Analysis
on: [push, workflow_dispatch]
jobs:
clean-up-actions:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
# Only cancel non-master branch runs
if: ${{ github.ref != 'refs/heads/master' }}
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
fmt:
if: github.event.pull_request.draft == false
runs-on: [self-hosted, Linux, X64]
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,11 @@ on:
tags-ignore:
- v[0-9]+.[0-9]+.[0-9]+*
workflow_dispatch:
jobs:
clean-up-actions:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
# Only cancel non-master branch runs
if: ${{ github.ref != 'refs/heads/master' }}
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

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

0 comments on commit 833092d

Please sign in to comment.