Skip to content

Commit

Permalink
[CI] use native concurrency to cancel previous CI runs
Browse files Browse the repository at this point in the history
  • Loading branch information
clangenb committed Jul 24, 2024
1 parent c84fcbf commit a7c7073
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,13 @@ on:
env:
VERBOSE: ${{ github.events.input.verbose }}

# Cancel a currently running workflow from the same PR, branch or tag when a new workflow is
# triggered (ref https://stackoverflow.com/a/72408109)
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
cancel_previous_runs:
name: Cancel Previous Runs
runs-on: ubuntu-20.04
steps:
- uses: styfle/[email protected]
with:
access_token: ${{ secrets.GITHUB_TOKEN }}

build_primary_binaries:
name: Primary build ${{ matrix.binary }} for ${{ matrix.rust-target }} on (${{ matrix.os }})
runs-on: ${{ matrix.os }}
Expand Down

0 comments on commit a7c7073

Please sign in to comment.