Skip to content

Commit

Permalink
Add docker hub publish step
Browse files Browse the repository at this point in the history
  • Loading branch information
camdencheek committed Jul 20, 2020
1 parent 3133779 commit 785bca4
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,24 @@ jobs:
command: |
ghr -t ${GHI_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} ${CIRCLE_TAG} ./artifacts/
publish-docker-release:
docker:
- image: circleci/buildpack-deps:stretch
steps:
- checkout
- setup_remote_docker
- attach_workspace:
at: ./artifacts
- run:
name: "Publish Release on Docker Hub"
command: |
docker_tag=$(echo ${CIRCLE_TAG} | cut -b2- )
docker build -t observiq/carbon:${docker_tag} .
docker login -u ${DOCKER_HUB_USER} -p ${DOCKER_HUB_TOKEN}
docker push observiq/carbon:${docker_tag}
docker tag observiq/carbon:${docker_tag} observiq/carbon:latest
docker push observiq/carbon:latest
test-linux:
executor: golang
resource_class: large
Expand Down Expand Up @@ -370,3 +388,11 @@ workflows:
ignore: /.*/
tags:
only: /^v\d+\.\d+\.\d+.*/
- publish-docker-release:
requires:
- build
filters:
branches:
ignore: /.*/
tags:
only: /^v\d+\.\d+\.\d+.*/

0 comments on commit 785bca4

Please sign in to comment.