forked from jdavis7257/Tiny-Redirect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
32 lines (27 loc) · 905 Bytes
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
machine:
services:
- docker
environment:
IMPORT_PATH: "github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME"
dependencies:
pre:
- go get github.com/tools/godep
#test:
# pre:
# - go vet src/redirect.go
#
# override:
# - godep go test src/redirect/go
deployment:
hub:
branch: master
commands:
- go get github.com/mitchellh/gox
- go get github.com/tcnksm/ghr
- gox -osarch="linux/amd64" -output="dist/{{.OS}}_{{.Arch}}" ./src/
# - ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME --replace `git describe --tags` dist/
- docker build --tag=jdavis7257/tiny-redirect:0.1 .
- docker build --tag=jdavis7257/tiny-redirect:latest .
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push jdavis7257/tiny-redirect:0.1
- docker push jdavis7257/tiny-redirect:latest