Commit 81ffc08
authored
fix(ci): use PR number in MicroShift workflow concurrency group (kroxylicious#3583)
* fix(ci): use PR number in MicroShift workflow concurrency group
When triggered via workflow_run, github.ref resolves to refs/heads/main
for all PRs, causing every PR build to share the same concurrency group
and cancel each other.
Use github.event.workflow_run.pull_requests[0].number (the originating
PR number) so each PR gets its own group, consistent with other workflows
that use github.event.pull_request.number || github.ref.
Assisted-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
* fix(ci): use head_branch for concurrency group and head_sha for checkout
For workflow_run triggers, github.event.pull_request is unavailable.
Using head_branch for the concurrency group is more reliable than
pull_requests[0].number and works for fork PRs too.
Checking out head_sha ensures we test the PR's actual code rather than
always defaulting to the main branch — the previous bug meant every
workflow_run trigger ran the main branch, not the PR under test.
Assisted-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
---------
Signed-off-by: Sam Barker <sam@quadrocket.co.uk>1 parent 65cf01e commit 81ffc08
1 file changed
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | 57 | | |
61 | 58 | | |
62 | 59 | | |
| |||
84 | 81 | | |
85 | 82 | | |
86 | 83 | | |
| 84 | + | |
| 85 | + | |
87 | 86 | | |
88 | 87 | | |
89 | 88 | | |
| |||
0 commit comments