Skip to content

Commit

Permalink
deploy via sh script
Browse files Browse the repository at this point in the history
Signed-off-by: Avelino <t@avelino.xxx>
  • Loading branch information
avelino committed Aug 16, 2020
1 parent ce697d7 commit 84042ba
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .travis.yml
Expand Up @@ -36,19 +36,13 @@ script:
deploy:
- provider: script
skip_cleanup: true
script:
- docker build . -t prest/prest:v1
- docker push prest/prest:v1
- docker tag prest/prest:v1 prest/prest:$TRAVIS_TAG && docker push prest/prest:$TRAVIS_TAG
- curl -sL https://git.io/goreleaser | bash
script: scripts/releaser-tag.sh
on:
tags: true
condition: $TRAVIS_OS_NAME = linux
go: "1.15.x"
- provider: script
script:
- docker build . -t prest/prest:latest
- docker push prest/prest:latest
script: scripts/releaser-latest.sh
on:
branch: master
go: "1.15.x"
Expand Down
3 changes: 3 additions & 0 deletions scripts/releaser-latest.sh
@@ -0,0 +1,3 @@
#!/usr/bin/env sh
docker build . -t prest/prest:latest && \
docker push prest/prest:latest
6 changes: 6 additions & 0 deletions scripts/releaser-tag.sh
@@ -0,0 +1,6 @@
#!/usr/bin/env sh
docker build . -t prest/prest:v1 && \
docker push prest/prest:v1 && \
docker tag prest/prest:v1 prest/prest:$TRAVIS_TAG && \
docker push prest/prest:$TRAVIS_TAG && \
curl -sL https://git.io/goreleaser | bash

0 comments on commit 84042ba

Please sign in to comment.