Skip to content

Commit 763f1c6

Browse files
committed
[CI] Fix docker building on main
1 parent ebf0851 commit 763f1c6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.circleci/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,11 @@ jobs:
222222
DOCKER_TAG=${DOCKER_BASE}/unverified-dev-build-do-not-use:PR${CIRCLE_PR_NUMBER}-${CIRCLE_BUILD_NUM}
223223
fi
224224
else
225+
if [[ -z $CIRCLE_BRANCH ]]; then
226+
BRANCHES=$(git branch -a --contains tags/$CIRCLE_TAG)
227+
CIRCLE_BRANCH=${BRANCHES##*/}
228+
echo "CIRCLE_BRANCH is empty, trying to set it from git, result: $CIRCLE_BRANCH"
229+
fi
225230
if [[ $CIRCLE_BRANCH != "main" && ! $CIRCLE_TAG =~ (a|b|rc) ]]; then
226231
echo "Final release tags are only allowed on main branch."
227232
exit 1

0 commit comments

Comments
 (0)