From fa5b64b87c0cfc27c3696f4a24f8c16d8cd3be63 Mon Sep 17 00:00:00 2001 From: Ayaz Badouraly <ayaz.badouraly@via.ecp.fr> Date: Fri, 23 Dec 2016 04:56:54 +0100 Subject: [PATCH] Triggering image build on Docker Hub after successful travis build --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index fcc38cf..8c9232d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,5 +15,13 @@ before_script: script: - docker run -t -v $PWD:/app:ro badouralix/zunit zunit test +after_success: + # Notify Docker Hub to make a new build + # See https://stackoverflow.com/questions/34710513/how-can-i-update-full-description-on-docker-hub-automatically + - > + [[ $TRAVIS_PULL_REQUEST == "false" && $TRAVIS_BRANCH == "master" ]] + && curl -X POST -H "Content-Type: application/json" --data '{"docker_tag_name": "latest"}' + https://registry.hub.docker.com/u/badouralix/oh-my-via/trigger/$DOCKER_HUB_TOKEN/ + # vim: ts=2 sw=2 sts=2 -- GitLab