Skip to content

fix: preserve workspace during branch creation in promote-branch workflow#162

Merged
petesramek merged 2 commits intodevelop/1.0from
copilot/release-1-0-promotion
Apr 3, 2026
Merged

fix: preserve workspace during branch creation in promote-branch workflow#162
petesramek merged 2 commits intodevelop/1.0from
copilot/release-1-0-promotion

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 3, 2026

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:
    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.

@petesramek petesramek marked this pull request as ready for review April 3, 2026 23:48
@petesramek petesramek merged commit 39f0002 into develop/1.0 Apr 3, 2026
1 check passed
@petesramek petesramek deleted the copilot/release-1-0-promotion branch April 4, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants