mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
ci: prevent cross-PR CI cancellation for mshv workflows
The existing concurrency configuration causes workflow runs for one Pull Request to cancel in-progress runs for another Pull Request. When the workflow is triggered by the `pull_request_target event`, `github.ref` is always set to the base branch, regardless of which branch raised the PR. This causes every new pull request to share the same concurrency key and thus cancel the running CI of any other open pull request. This commit updates the `concurrency.group` to use `github.event.pull_request.number` for unique isolation when running on PR, falling back to `github.ref` for non-PR push (e.g., merge group). Signed-off-by: AASTHA RAWAT <aastharawat@microsoft.com>
This commit is contained in:
2
.github/workflows/mshv-infra.yaml
vendored
2
.github/workflows/mshv-infra.yaml
vendored
@@ -38,7 +38,7 @@ on:
|
||||
description: 'Private IP of the VM'
|
||||
value: ${{ jobs.infra-setup.outputs.PRIVATE_IP }}
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
infra-setup:
|
||||
|
||||
Reference in New Issue
Block a user