Repository navigation
Commit 66126ad
committed
fix: skip tag-annotation fetch step on workflow_dispatch
The 'Get Tag Annotations' step runs:
git fetch -f origin ${{ github.ref }}:${{ github.ref }}
When the workflow is triggered manually (workflow_dispatch), github.ref
resolves to refs/heads/main. Git refuses to fetch into a branch that is
already checked out, exiting with code 128.
The fetch is only meaningful for tag-triggered runs (it retrieves
annotated tag metadata that the shallow checkout misses). Add an
'if: startsWith(github.ref, "refs/tags/")' condition so the step is
skipped entirely on manual dispatch triggers.1 parent bdb8525 commit 66126ad
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| |||
0 commit comments