diff --git a/.github/workflows/check-cabal-files.yml b/.github/workflows/check-cabal-files.yml index d9960257e04..f6972acbfde 100644 --- a/.github/workflows/check-cabal-files.yml +++ b/.github/workflows/check-cabal-files.yml @@ -4,9 +4,18 @@ on: push: merge_group: -# Limit concurrent runs of this workflow within a single PR +# 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/ (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.workflow }}-${{ github.event.type }}-${{ github.event.pull_request.number || github.ref }} + group: ${{ github.workflow }}-${{ github.event.type }}-${{ startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && github.ref || github.event.pull_request.number || github.run_id }} cancel-in-progress: true jobs: diff --git a/.github/workflows/check-git-dependencies.yml b/.github/workflows/check-git-dependencies.yml index 5c5f1e321a3..2f23c276dd8 100644 --- a/.github/workflows/check-git-dependencies.yml +++ b/.github/workflows/check-git-dependencies.yml @@ -4,9 +4,18 @@ on: push: merge_group: -# Limit concurrent runs of this workflow within a single PR +# 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/ (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.workflow }}-${{ github.event.type }}-${{ github.event.pull_request.number || github.ref }} + group: ${{ github.workflow }}-${{ github.event.type }}-${{ startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && github.ref || github.event.pull_request.number || github.run_id }} cancel-in-progress: true jobs: diff --git a/.github/workflows/check-hlint.yml b/.github/workflows/check-hlint.yml index 17c14768e20..728cef3dded 100644 --- a/.github/workflows/check-hlint.yml +++ b/.github/workflows/check-hlint.yml @@ -4,9 +4,18 @@ on: push: merge_group: -# Limit concurrent runs of this workflow within a single PR +# 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/ (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.workflow }}-${{ github.event.pull_request.number || github.ref }} + group: ${{ github.workflow }}-${{ github.event.type }}-${{ startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && github.ref || github.event.pull_request.number || github.run_id }} cancel-in-progress: true jobs: diff --git a/.github/workflows/check-mainnet-config.yml b/.github/workflows/check-mainnet-config.yml index cb9ef0dee9a..1988909a5f3 100644 --- a/.github/workflows/check-mainnet-config.yml +++ b/.github/workflows/check-mainnet-config.yml @@ -4,9 +4,18 @@ on: push: merge_group: -# Limit concurrent runs of this workflow within a single PR +# 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/ (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.workflow }}-${{ github.event.type }}-${{ github.event.pull_request.number || github.ref }} + group: ${{ github.workflow }}-${{ github.event.type }}-${{ startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && github.ref || github.event.pull_request.number || github.run_id }} cancel-in-progress: true jobs: diff --git a/.github/workflows/check-nix-config.yml b/.github/workflows/check-nix-config.yml index b9f13168fff..dbf70ee9937 100644 --- a/.github/workflows/check-nix-config.yml +++ b/.github/workflows/check-nix-config.yml @@ -4,9 +4,18 @@ on: push: merge_group: -# Limit concurrent runs of this workflow within a single PR +# 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/ (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.workflow }}-${{ github.event.type }}-${{ github.event.pull_request.number || github.ref }} + group: ${{ github.workflow }}-${{ github.event.type }}-${{ startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && github.ref || github.event.pull_request.number || github.run_id }} cancel-in-progress: true jobs: diff --git a/.github/workflows/haskell-linux.yml b/.github/workflows/haskell-linux.yml index 1bfe1b88b68..34d538da41a 100644 --- a/.github/workflows/haskell-linux.yml +++ b/.github/workflows/haskell-linux.yml @@ -4,9 +4,18 @@ on: push: merge_group: -# Limit concurrent runs of this workflow within a single PR +# 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/ (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.workflow }}-${{ github.event.type }}-${{ github.event.pull_request.number || github.ref }} + group: ${{ github.workflow }}-${{ github.event.type }}-${{ startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && github.ref || github.event.pull_request.number || github.run_id }} cancel-in-progress: true jobs: diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index fdec589a4ff..0a27b9744ec 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -4,9 +4,18 @@ on: push: merge_group: -# Limit concurrent runs of this workflow within a single PR +# 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/ (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.workflow }}-${{ github.event.type }}-${{ github.event.pull_request.number || github.ref }} + group: ${{ github.workflow }}-${{ github.event.type }}-${{ startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && github.ref || github.event.pull_request.number || github.run_id }} cancel-in-progress: true jobs: diff --git a/.github/workflows/markdown-links-ci-check.yml b/.github/workflows/markdown-links-ci-check.yml index 41587edfda0..d353ad77a0d 100644 --- a/.github/workflows/markdown-links-ci-check.yml +++ b/.github/workflows/markdown-links-ci-check.yml @@ -4,9 +4,18 @@ on: push: merge_group: -# Limit concurrent runs of this workflow within a single PR +# 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/ (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.workflow }}-${{ github.event.type }}-${{ github.event.pull_request.number || github.ref }} + group: ${{ github.workflow }}-${{ github.event.type }}-${{ startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && github.ref || github.event.pull_request.number || github.run_id }} cancel-in-progress: true jobs: diff --git a/.github/workflows/stylish-haskell.yml b/.github/workflows/stylish-haskell.yml index 42a4eec6625..199c7b36643 100644 --- a/.github/workflows/stylish-haskell.yml +++ b/.github/workflows/stylish-haskell.yml @@ -4,9 +4,18 @@ on: push: merge_group: -# Limit concurrent runs of this workflow within a single PR +# 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/ (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.workflow }}-${{ github.event.type }}-${{ github.event.pull_request.number || github.ref }} + group: ${{ github.workflow }}-${{ github.event.type }}-${{ startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && github.ref || github.event.pull_request.number || github.run_id }} cancel-in-progress: true jobs: