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 .