Skip to content

Commit

Permalink
Cancel outdated runs of the same workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Undin committed Nov 17, 2023
1 parent ce5b1ae commit d851efa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/gradle-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ name: Gradle Build

on: [push, pull_request]

# Allow cancelling all previous runs for the same branch
# See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-20.04
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/gradle-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ name: Gradle Test

on: [push, pull_request]

# Allow cancelling all previous runs for the same branch
# See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-20.04
Expand Down

0 comments on commit d851efa

Please sign in to comment.