From 2f2ac12c2e88d4076aa57ad4b241a5c9cd7dd1e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Pazos?= Date: Mon, 30 Sep 2024 17:36:45 -0300 Subject: [PATCH] fix: build docker script checks whether the github event is a tag push --- build_docker.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build_docker.sh b/build_docker.sh index fde2ffe9..93b95400 100755 --- a/build_docker.sh +++ b/build_docker.sh @@ -5,8 +5,7 @@ version=$(git describe --tags --always | sed 's/^v//') # note: we may want to extend this to also not tag as latest if working tree is dirty. # but i think because of how go bindata works, it probably makes a change in the working tree. tag=master -BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF_NAME:-$(git branch --show-current)}} -[[ "$BRANCH" == "master" ]] && [[ "$version" != *-* ]] && tag=latest +[[ "$GITHUB_EVENT_NAME" = "push" ]] && [[ "$GITHUB_REF_TYPE" = "tag" ]] && [[ "$version" != *-* ]] && tag=latest docker build --tag=grafana/carbon-relay-ng:$tag .