ci: Do not cancel jobs on main branch. (#8471)
authorMathias Preiner <mathias.preiner@gmail.com>
Thu, 31 Mar 2022 00:50:04 +0000 (17:50 -0700)
committerGitHub <noreply@github.com>
Thu, 31 Mar 2022 00:50:04 +0000 (17:50 -0700)
This will prevent that jobs on the main branch get cancelled when new PRs are merged in before the previous ones finished on main.

.github/workflows/ci.yml

index 8232933b1b81b8e71fec3e48f0e093476e9326bb..badbcd16ce4e951d72c953049c5cc004d06dc4cc 100644 (file)
@@ -69,7 +69,7 @@ jobs:
     # cancel already running jobs for the same branch/pr/tag
     concurrency:
       group: build-${{ github.ref }}-${{ matrix.name }}
-      cancel-in-progress: true
+      cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
 
     steps: