Commit 39f0002
fix: preserve workspace during branch creation in promote-branch workflow (#162)
`git switch <base-branch>` in the "Create target branch" step replaced
the workspace with the base branch contents. Since `main` doesn't carry
the composite actions, the immediately following `Lock target branch`
step couldn't resolve `action.yml`.
## Change
- **`promote-branch.yml`** — replaced the `git switch` + `git checkout
-b` + `git push` sequence with a single refspec push:
```sh
git fetch origin
git push origin origin/<base-branch>:refs/heads/<target-branch>
```
Creates the remote branch from the base ref without touching the local
workspace, so the source branch's composite actions remain accessible
for subsequent steps.
## Side effect to handle
`release/1.0` was already created by the failed run (off `main`,
unprotected). After this fix lands on `preview/1.0`, delete
`release/1.0` and re-run `promote-branch` to get a correctly locked
branch.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: petesramek <2333452+petesramek@users.noreply.github.com>1 parent 648eadd commit 39f0002
1 file changed
Lines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
208 | 211 | | |
209 | | - | |
210 | | - | |
211 | 212 | | |
212 | | - | |
213 | | - | |
214 | | - | |
| 213 | + | |
215 | 214 | | |
216 | 215 | | |
217 | 216 | | |
| |||
0 commit comments