Skip to content

Commit

Permalink
fix: build docker script checks whether the github event is a tag push
Browse files Browse the repository at this point in the history
  • Loading branch information
npazosmendez committed Sep 30, 2024
1 parent d39ec2d commit 2f2ac12
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions build_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down

0 comments on commit 2f2ac12

Please sign in to comment.