From 05c1c6eba73ae0f3ac65583f1f9e4ecd770c4db1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Sun, 23 Jul 2017 17:18:50 +0200 Subject: [PATCH] added new hook var GITHUB_USERNAME --- hooks/build | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hooks/build b/hooks/build index d110132..e04b4c2 100755 --- a/hooks/build +++ b/hooks/build @@ -9,13 +9,13 @@ set -ex for DOCKER_IMAGE in ${DOCKER_IMAGES}; do if [ ${TRAVIS} == 'true' ]; then - echo "Build Zammad Docker image ${DOCKER_IMAGE} with version ${TRAVIS_BUILD_NUMBER} for DockerHubs ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE} repo" + echo "Build Zammad Docker image ${DOCKER_IMAGE} with version ${TRAVIS_BUILD_NUMBER} for DockerHubs ${DOCKER_REGISTRY}/${GITHUB_USERNAME}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE} repo" - docker build --pull --no-cache --build-arg BUILD_DATE=$(date -u +”%Y-%m-%dT%H:%M:%SZ”) -t ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE} -t ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE}-${TRAVIS_BUILD_NUMBER} -f containers/${DOCKER_IMAGE}/Dockerfile . + docker build --pull --no-cache --build-arg BUILD_DATE=$(date -u +”%Y-%m-%dT%H:%M:%SZ”) -t ${DOCKER_REGISTRY}/${GITHUB_USERNAME}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE} -t ${DOCKER_REGISTRY}/${GITHUB_USERNAME}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE}-${TRAVIS_BUILD_NUMBER} -f containers/${DOCKER_IMAGE}/Dockerfile . - docker push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE} + docker push ${DOCKER_REGISTRY}/${GITHUB_USERNAME}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE} - docker push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE}-${TRAVIS_BUILD_NUMBER} + docker push ${DOCKER_REGISTRY}/${GITHUB_USERNAME}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE}-${TRAVIS_BUILD_NUMBER} else echo "Build Zammad Docker image ${DOCKER_IMAGE} for DockerHubs ${DOCKER_REPO}:${DOCKER_IMAGE} repo"