Skip to content

Commit

Permalink
Add DockerHub deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
VMitov committed Jun 20, 2017
1 parent ae85fbb commit f35784e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 deletions.
33 changes: 22 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
go: tip
os: linux

- stage: GitHub releases
- stage: GitHub & DockerHub releases
script: skip
before_deploy:
- GOOS=linux go build -o releases/casper
Expand All @@ -40,13 +40,24 @@ jobs:
- sha256sum *.tar.gz > sha256sum.txt
- cd ..
deploy:
provider: releases
api_key: $GITHUB_TOKEN_KEY
file:
- "releases/casper.linux-amd64.tar.gz"
- "releases/casper.darwin-amd64.tar.gz"
- "releases/casper.windows-amd64.tar.gz"
- "releases/sha256sum.txt"
skip_cleanup: true
on:
tags: true
- provider: releases
api_key: $GITHUB_TOKEN_KEY
file:
- "releases/casper.linux-amd64.tar.gz"
- "releases/casper.darwin-amd64.tar.gz"
- "releases/casper.windows-amd64.tar.gz"
- "releases/sha256sum.txt"
skip_cleanup: true
on:
tags: true
- provider: script
script:
- cp Dockerfile releases/
- cd releases
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
- docker build -t miracl/casper .
- docker push miracl/casper
skip_cleanup: true
on:
tags: true

3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM scratch
ADD ./casper /
ENTRYPOINT ["/casper"]

0 comments on commit f35784e

Please sign in to comment.