diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index 61d5d7bc4..2275362e9 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -22,10 +22,10 @@ on: - 'lib/**' concurrency: - # Skip intermediate builds: always. - # Cancel intermediate builds: always. - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + # Skip intermediate builds: all builds except for builds on the `master` branch + # Cancel intermediate builds: only pull request builds + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || github.run_number }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} jobs: test-default: