diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..da63aaa --- /dev/null +++ b/.travis.yml @@ -0,0 +1,24 @@ +sudo: required +dist: trusty + +language: go + +go: + - tip + +service: + - docker + +before_install: + - curl https://glide.sh/get | sh + +script: + - glide up + - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build + - docker build -t registry.cn-hangzhou.aliyuncs.com/deepzz/eiblog . + +after_success: + - if [ "$TRAVIS_BRANCH" == "master" ]; then + docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" registry.cn-hangzhou.aliyuncs.com; + docker push registry.cn-hangzhou.aliyuncs.com/deepzz/eiblog; + fi \ No newline at end of file