docker tag and push :latest when building a git tag

Signed-off-by: Steve Kriss <steve@heptio.com>
pull/435/head
Steve Kriss 2018-04-19 09:56:03 -07:00
parent 3be8d072ab
commit c1af90dcc8
1 changed files with 5 additions and 0 deletions

View File

@ -121,6 +121,11 @@ container-name:
push: .push-$(DOTFILE_IMAGE) push-name
.push-$(DOTFILE_IMAGE): .container-$(DOTFILE_IMAGE)
@docker push $(IMAGE):$(VERSION)
@if git describe --tags --exact-match >/dev/null 2>&1; \
then \
docker tag $(IMAGE):$(VERSION) $(IMAGE):latest; \
docker push $(IMAGE):latest; \
fi
@docker images -q $(IMAGE):$(VERSION) > $@
push-name: