Commit c0a3104
Ritchie
fix(ci): skip release-drafter on pull_request events
The release-drafter action runs on both push (main) and pull_request
events. When triggered by a PR, it attempts to update the draft release
with the PR merge ref (refs/pull/N/merge) as target_commitish, which the
GitHub Releases API rejects with a 422 validation error.
Fix: add condition to the job so the
draft release is only updated when commits land on main. The PR trigger
is still listed in the workflow triggers for the autolabeler feature —
it will simply be skipped at the job level.
Fixes recurring failures: runs 23481318939, 23369773059, 23369768998,
23111592904 (all 'invalid target_commitish' errors).1 parent 684ee68 commit c0a3104
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
| |||
0 commit comments