orbitalci / orbital

Orbital is a self-hosted CI system for solo/small consulting dev teams. Written in Rust.
GNU General Public License v3.0
29 stars 2 forks source link

Builds that don't specify a commit (like polled builds) should use the HEAD commit of branch, instead of checking out commit by hash #221

Closed tjtelan closed 4 years ago

tjtelan commented 5 years ago

If a user wanted to build in information about the git repo into their artifact using the git repo info, it will always say that we are in a detached HEAD branch.

We can preserve branch information by checking code out similar to this approach:

git checkout <branch> && git reset --hard <hash>