Push to Docker Hub from Travis

This commit is contained in:
Martin Polden 2019-03-16 15:14:32 +01:00
parent c9fe2919e4
commit fd7e13c98e
2 changed files with 16 additions and 4 deletions

View File

@ -9,7 +9,9 @@ env:
- GO111MODULE=on
deploy:
provider: heroku
app: ifconfig-co
api_key:
secure: IQG/ls5Zu0yua5Ynn5EL9JCPjo1/WcmS0z7BSaXWdgW+JIWFm7oF5z54bUZHl/q1tTuWzAJk59zSTYJijtQqh2Ssl3fLu3uFDwyJSrOuUu1akPlETam8NpdbH4lPkFp75JSDdDXV08c0APmeLL6gqRuTrUuufu69Wigjq4gLo+o=
- provider: script
script: make docker-push
- provider: heroku
app: ifconfig-co
api_key:
secure: IQG/ls5Zu0yua5Ynn5EL9JCPjo1/WcmS0z7BSaXWdgW+JIWFm7oF5z54bUZHl/q1tTuWzAJk59zSTYJijtQqh2Ssl3fLu3uFDwyJSrOuUu1akPlETam8NpdbH4lPkFp75JSDdDXV08c0APmeLL6gqRuTrUuufu69Wigjq4gLo+o=

View File

@ -1,3 +1,4 @@
DOCKER_IMAGE := mpolden/echoip
OS := $(shell uname)
ifeq ($(OS),Linux)
TAR_OPTS := --wildcards
@ -31,3 +32,12 @@ $(databases):
test ! -f data/GeoLite2-Country.mmdb || mv data/GeoLite2-Country.mmdb data/country.mmdb
geoip-download: $(databases)
docker-build:
docker build -t $(DOCKER_IMAGE) .
docker-login:
@echo "$(DOCKER_PASSWORD)" | docker login -u "$(DOCKER_USERNAME)" --password-stdin
docker-push: docker-build docker-login
docker push $(DOCKER_IMAGE)