add deploy step to ci
This commit is contained in:
parent
1ef560dcac
commit
c097c863bd
12
.travis.yml
12
.travis.yml
@ -2,7 +2,9 @@ language: go
|
|||||||
go:
|
go:
|
||||||
- "1.x"
|
- "1.x"
|
||||||
|
|
||||||
env: GO111MODULE=on
|
env:
|
||||||
|
- GO111MODULE=on
|
||||||
|
- CGO_ENABLED=0
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- go mod download
|
- go mod download
|
||||||
@ -10,3 +12,11 @@ install:
|
|||||||
script:
|
script:
|
||||||
- go build ./cmd/gomodproxy
|
- go build ./cmd/gomodproxy
|
||||||
- go test -race -v ./...
|
- go test -race -v ./...
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
provider: script
|
||||||
|
script:
|
||||||
|
- printf 'FROM scratch\nADD gomodproxy /\nCMD ["/gomodproxy"]' > Dockerfile
|
||||||
|
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
||||||
|
- docker build -t "sixt/gomodproxy" .
|
||||||
|
- docker push "sixt/gomodproxy"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user