Skip to content

Commit

Permalink
add travis
Browse files Browse the repository at this point in the history
  • Loading branch information
eraac committed Dec 5, 2017
1 parent e829090 commit 75d5b74
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
sudo: required

language: go
go:
- 1.9

services:
- docker

script:
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o cards-generator *.go

after_success:
- docker login -u="$DOCKER_USER" -p="$DOCKER_PASS"
- export REPO=traincat/cards-generator
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
- docker build -f Dockerfile -t $REPO:$TAG .
- docker push $REPO
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM eraac/golang

ADD cards-generator /cards-generator

CMD ["/cards-generator", "-config", "/config/config.json"]

0 comments on commit 75d5b74

Please sign in to comment.