Skip to content

Commit

Permalink
Fix Docker image tagging
Browse files Browse the repository at this point in the history
  • Loading branch information
boynux committed Feb 25, 2022
1 parent 4e0ebca commit 40f50e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ dist: xenial
go:
- 1.16.x
deploy:
- provider: script
on:
tag: true
script: bash ./deploy.sh
- provider: releases
skip_cleanup: true
token: $GH_TOKEN
file: bin/squid-exporter
on:
tags: true
- provider: script
on:
branch: master
script: bash ./deploy.sh
2 changes: 2 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ IMAGE_TAG=${TRAVIS_TAG:-latest}

docker --version
docker build -t $IMAGE_NAME:$IMAGE_TAG .
docker tag $IMAGE_NAME:$IMAGE_TAG $IMAGE_NAME:latest
echo $DOCKER_API_KEY | docker login -u boynux --password-stdin
docker push $IMAGE_NAME:$IMAGE_TAG
docker push $IMAGE_NAME:latest

0 comments on commit 40f50e3

Please sign in to comment.