Description
Background
In our repository workflow, we are creating a merge commit of some PRs and pushing it using the naming scheme refs/deploy-bot/${runId}/merge
. This is then checked out in later dependant steps, by passing this value as ref:
.
Problem description
This stopped working in 4.1.7 with the changes from #1774.
Checkout now results in an error:
Error: A branch or tag with the name 'refs/deploy-bot/9543036827/merge' could not be found
Attempted solutions
I tried switching to an "unqualified ref" name deploy-bot/9543036827/merge
in the hopes that the branch can then be found, but then the checkout already fails during fetching:
Fetching the repository
/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +refs/heads/deploy-bot/9545625056/merge*:refs/remotes/origin/deploy-bot/9545625056/merge* +refs/tags/deploy-bot/9545625056/merge*:refs/tags/deploy-bot/9545625056/merge*
The process '/usr/bin/git' failed with exit code 1
Waiting 17 seconds before trying again
...
Alternative solutions
- Use a standard branch ref or tag ref.
We would like to avoid having to use standard branch or tag refs, because we don't want to clutter the branch listings in git output and the GitHub UI with our temporary branch names.
Metadata
Metadata
Assignees
Labels
No labels