Enable auto push of docker images (#69)
* Enable auto push of docker images * Fix Makefile
This commit is contained in:
Родитель
66bdd92f39
Коммит
5b5f9064ae
17
.travis.yml
17
.travis.yml
|
@ -1,4 +1,19 @@
|
|||
language: go
|
||||
|
||||
go:
|
||||
- 1.13.x
|
||||
- 1.13.x
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
script:
|
||||
- make
|
||||
|
||||
before_deploy:
|
||||
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
||||
|
||||
deploy:
|
||||
provider: script
|
||||
script: make docker-push
|
||||
on:
|
||||
branch: master
|
6
Makefile
6
Makefile
|
@ -1,4 +1,4 @@
|
|||
.PHONY:all run linux docker generate tidy protobuf cover
|
||||
.PHONY:all run linux docker generate tidy protobuf cover docker-push
|
||||
|
||||
all:
|
||||
go get ./pkg/...
|
||||
|
@ -16,6 +16,10 @@ linux:
|
|||
docker:
|
||||
docker build . -t sloop
|
||||
|
||||
docker-push: docker
|
||||
docker tag sloop:latest sloopimage/sloop:latest
|
||||
docker push sloopimage/sloop:latest
|
||||
|
||||
generate:
|
||||
go generate ./pkg/...
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче