Skip to content

Commit afc5f77

Browse files
flanakinclaude
andcommitted
fix(ci): stop no-op label events from cancelling PR deployments
The PR Deploy workflow shared one concurrency group across both its `pull_request` and `pull_request_target` triggers with `cancel-in-progress: true`. Any bot label landing while a deployment was running entered the same group and cancelled it, then skipped every job because check-options requires the label to be 'Needs: Deployment'. The PR was left with cancelled/skipped deploy jobs and no explanation. Label events that are not 'Needs: Deployment' now get a unique, throwaway group so they cancel nothing. Real deployments — every `pull_request` run and the 'Needs: Deployment' label run — stay in the shared per-PR group, so a new push still cancels an in-flight deployment. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent ac8daaf commit afc5f77

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎.github/workflows/ftk-pr-deploy.yml‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,13 @@ env:
2929
AZ_RESOURCES_VERSION: '6.16.2'
3030
AZ_STORAGE_VERSION: '6.2.0'
3131

32+
# Deploy runs for the same PR share one group so a new push cancels the
33+
# in-flight deployment. Label events that are NOT 'Needs: Deployment' are no-ops
34+
# (see the check-options condition below), so they get a unique, throwaway group
35+
# — otherwise an unrelated bot label would cancel a running deployment and leave
36+
# only skipped jobs behind, which reads as "deployment not requested".
3237
concurrency:
33-
group: ftk-pr-${{ github.event.pull_request.number }}
38+
group: "ftk-pr-${{ github.event.pull_request.number }}${{ (github.event_name == 'pull_request_target' && github.event.label.name != 'Needs: Deployment') && format('-noop-{0}', github.run_id) || '' }}"
3439
cancel-in-progress: true
3540

3641
permissions:

0 commit comments

Comments
 (0)