Skip to content

Commit

Permalink
chore: auto cancel (#1619)
Browse files Browse the repository at this point in the history
kill previous CI runs when pushing a new commit
  • Loading branch information
andiwand committed Oct 25, 2022
1 parent ca3320f commit 9d65e7f
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
paths-ignore:
- "docs/**"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
CTEST_OUTPUT_ON_FAILURE: 1
CCACHE_DIR: ${{ github.workspace }}/ccache
Expand Down Expand Up @@ -117,4 +121,3 @@ jobs:
git add -A
git commit -m"update metrics"
git push
6 changes: 5 additions & 1 deletion .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
name: Backport

on:
pull_request_target:
types:
- closed
- labeled

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
backport:
name: Backport
Expand Down Expand Up @@ -32,4 +37,3 @@ jobs:
---
<%= body %>
5 changes: 4 additions & 1 deletion .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
paths-ignore:
- "docs/**"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
CTEST_OUTPUT_ON_FAILURE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
Expand Down Expand Up @@ -609,4 +613,3 @@ jobs:
&& cmake --build build
- name: ccache stats
run: ccache -s

4 changes: 4 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
- 'release/**'
- 'develop/**'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
format:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
- 'release/**'
- 'develop/**'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
docs:
runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Release

on:
push:
branches:
Expand Down Expand Up @@ -26,4 +27,4 @@ jobs:
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
CI/release.py make-release
CI/release.py make-release
3 changes: 1 addition & 2 deletions .github/workflows/release_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Release PR

on:
pull_request:


jobs:
process_release_pr:
Expand All @@ -22,4 +21,4 @@ jobs:
- name: Run release script
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: CI/release.py pr-action --fail
run: CI/release.py pr-action --fail

0 comments on commit 9d65e7f

Please sign in to comment.