diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml index a8b633ef4..e1bb6606f 100644 --- a/.github/workflows/desktop-build.yml +++ b/.github/workflows/desktop-build.yml @@ -38,10 +38,13 @@ on: - 'vcpkg.json' - 'vcpkg' -# Cancel earlier, unfinished runs of this workflow on the same branch (unless on master) +# Ensure at most one run per ref: queue new runs when one is in progress. +# On master, cancel-in-progress is false so each push gets full CI (runs queue). +# On other refs (tags, PRs), cancel-in-progress is true to avoid redundant builds. +# Using github.ref ensures stable grouping (ref_name can be empty in some events). concurrency: - group: "${{ github.workflow }} @ ${{ github.ref_name }}" - cancel-in-progress: ${{ github.ref_name != 'master' }} + group: "${{ github.workflow }} @ ${{ github.ref || github.run_id }}" + cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} jobs: configure: