From 65c41bb1ff7ee9cc0335e7a2e5988a42c1055a63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCrten?= <sebastian@mobanisto.de> Date: Fri, 21 Jan 2022 07:56:58 +0100 Subject: [PATCH] Let CI build on branch instead of detached head --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 27175c413b..2398148db3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,6 +11,9 @@ variables: before_script: - set -e - export GRADLE_USER_HOME=$PWD/.gradle + # make sure the CI doesn't run in detached state so that we can + # extract the branch name during build + - git checkout "$CI_COMMIT_REF_NAME" after_script: # these file change every time and should not be cached -- GitLab