diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0f8456..a9c922a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,9 @@ name: CI permissions: contents: read +# Each main run gets a group of its own, since GitHub drops a pending run of a group when a newer one queues. concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }} cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} env: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index fec5ad2..88310d9 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -13,8 +13,9 @@ name: CodeQL permissions: contents: read +# Each main run gets a group of its own, since GitHub drops a pending run of a group when a newer one queues. concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }} cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 2cad3a9..afe1388 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -10,8 +10,9 @@ name: Coverage permissions: contents: read +# Each main run gets a group of its own, since GitHub drops a pending run of a group when a newer one queues. concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }} cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} env: