Commit 0a374f4
authored
fix: checkout missing in workflow-variables job causes promote-branch to always attempt branch creation (#205)
The `workflow-variables` job in `promote-branch.yml` had no
`actions/checkout` step, so `origin` was never configured as a git
remote. `git ls-remote --exit-code --heads origin <target-branch>`
always failed (exit non-zero), and with `set +e` the error was swallowed
— resulting in `target-branch-exists` always being `false`. The
`promote-branch` job then unconditionally tried to create the target
branch from `origin/main`, which was rejected as a non-fast-forward push
when the branch already existed ahead of `main`.
## Changes
- **`.github/workflows/promote-branch.yml`**: Add `actions/checkout@v6`
as the first step in `workflow-variables` so `origin` is configured
before `git ls-remote` runs, enabling the `target-branch-exists` guard
to work correctly.1 parent 6b1acec commit 0a374f4
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
| |||
0 commit comments