workflows: prevent accidental cancelling of other PRs

This can happen when two PRs run at the same time, which come from
different forks, but have the same head branch name.

github.head_ref is suggested by GitHub's docs, but.. that's not really
useful for cases with forks.

(cherry picked from commit 7ba7720b28)
This commit is contained in:
Wolfgang Walther
2025-06-13 16:59:36 +02:00
parent cf25ce07e8
commit 93ecbedbae
11 changed files with 11 additions and 11 deletions

View File

@@ -7,7 +7,7 @@ on:
pull_request_target:
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
permissions: {}