Skip to content

Commit

Permalink
Concurrency for build job
Browse files Browse the repository at this point in the history
  • Loading branch information
newhoggy committed Mar 17, 2023
1 parent a0aa633 commit b024a66
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/haskell.yml
Expand Up @@ -25,6 +25,27 @@ jobs:
# current ref from: 27.02.2022
SECP256K1_REF: ac83be33d0956faf6b7f61a60ab524ef7d6a473a

# When pushing branches (and/or updating PRs), we do want to cancel previous
# build runs. We assume they are stale now; and do not want to spend CI time and
# resources on continuing to continue those runs. This is what the concurrency.group
# value lets us express. When using merge queues, we now have to consider
# - runs triggers by commits per pull-request
# we want to cancel any previous run. So they should all get the same group (per PR)
# - runs refs/heads/gh-readonly-queue/<target branch name> (they should all get their
# unique git ref, we don't want to cancel any of the ones in the queue)
# - if it's neither, we fall back to the run_id (this is a unique number for each
# workflow run; it does not change if you "rerun" a job)
concurrency:
group: >
${{ github.event.type }}
${{ github.workflow }}
${{ github.job }}
${{ matrix.ghc }}
${{ matrix.cabal }}
${{ matrix.os }}
${{ (startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && github.ref) || github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

steps:
- name: Install Haskell
uses: input-output-hk/setup-haskell@v1
Expand Down

0 comments on commit b024a66

Please sign in to comment.