GitLab offers many predefined variables
Most describe the current job, stage and pipeline
Some describe the GitLab server
Some help interacting with the GitLab server
Remove variables
directive
git checkout 160_gitlab_ci/020_variables/predefined -- '*'
Update build command:
go build \
-ldflags "-X main.Version=${CI_COMMIT_REF_NAME}" \
-o hello \
.