Skip to content

Commit

Permalink
Stop publishing tags for PRs (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
aattuluri committed Feb 26, 2020
1 parent fb63c53 commit f3a60ee
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,19 +87,24 @@ endif
endif
ifndef TAG
override TAG=$(SHA)
override DO_NOT_PUBLISH=1
endif

docker-build: set-tag
#NOTE: Assumes binary has already been built (admiral)
docker build -t $(IMAGE):$(TAG) -f ./admiral/docker/Dockerfile.admiral .

docker-publish:
ifndef DO_NOT_PUBLISH
echo "$(DOCKER_PASS)" | docker login -u $(DOCKER_USER) --password-stdin
endif
ifeq ($(TAG),)
echo "This is not a Tag/Release, skipping docker publish"
else
ifndef DO_NOT_PUBLISH
docker push $(IMAGE):$(TAG)
endif
endif
#no tag set and its master branch, in this case publish `latest` tag
ifeq ($(TAG),)
ifeq ($(BRANCH),master)
Expand Down

0 comments on commit f3a60ee

Please sign in to comment.