Skip to content

Commit

Permalink
Auto-cancel github actions workflow if a newer commit gets pushed to …
Browse files Browse the repository at this point in the history
…a given branch/PR.
  • Loading branch information
insertinterestingnamehere committed Oct 7, 2024
1 parent d8a2690 commit 9572788
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ name: CI

on: [push, pull_request]

# Cancel the current workflow if a newer commit gets pushed to the
# branch or PR that triggered it.
concurrency:
group: ${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
linux-gcc:
runs-on: ubuntu-22.04
Expand Down

0 comments on commit 9572788

Please sign in to comment.