From 8962c59a36fb0f15c29de465ec8d90cde38d6cf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Fri, 24 May 2019 08:12:26 +0200 Subject: [PATCH] Fix: Deploy using Travis --- .travis.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.travis.yml b/.travis.yml index 217250a..5096e98 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,14 @@ language: ruby +env: + global: + - secure: "ZWbEneLqerp3amclsWr02HVB6Q2v+gwqenIxSFvvkhzrkmYDuazYGkcOYkMHafKUIgWJvjVZvyxZ5Tad3BbbvweUVPTHFjM0XUNbOJkqRRwsHl2+EQRh9GM99rb61v+9p1pA5DU+oGN64TYgeIe5rc7XLUKH5E2ZOHNFwRLVSGKqNLToBhH3HS6SoqDMSuqhc+12+JgC4FubnzsdjgM5/dJBAlB/yY3TZrAHDKp7nvTyfoN+VkgT6ILpqsvt6lONiNy0gNnSE9TLijhlzz9q7GnX3gWwINt0rBpZ1cu+QdqMa0O4qJhEX07fMTIGWV00McDotVDAHrIv2oh6JVxiJbb013A5t4f3zg8gYOTCrtnv2VP8Jf2YnegTw4OfZyT7t28wSkpj5V3+rwOmRSpv652M/8BIYks1sc4w+UYYuYdey4k1RnsiNdC9XO+V5Y/bL9gN8njfQYS4XPf19vxcYBmpH1K4D/oPxghdpTPLaL+9+lsLWr2/UyMJXyRES6eRHJNUSeSjta2JUDhtNUey8fyD43Zcd+Ne2a5Ct8P+0ZGQD8L7HpaocrzJkjIpx6FmC57e1zgpQp7EVo6rEa7KpYe7/YwyWJa7B+lmIXKLFzLeApBoFU+pt5svhvuxNG97XEF50t9xc3sKYR8avTPSqHMmobgrJ4tselbsdaV+e9I=" + - secure: "SvF6TmZMj1LBWp0ebity9nB3PPyIF4wCTREbYRAhWHE5gOBYEOpt5UdUUJFQADb2nlBXtjmX0DDgX+SoPDJKFta1NDaEB877xAfWcm3KXBfo3g1Q+2bkVYEpPTXL7CE+C+Uu5vhIRloC6aNJ6iJIFjPTTPlCcr8gtxgT+Qu8PQww2lctAexOlualtza9SBSwB2OOxxtCOBAFyK/Nj5Pr3IShoqlXTtKD2u8Pr6Pe5jIwDdcll+PGU238EEqFr8KAfAmLQvNbyKULYLu8vb4tlWdUteTrQo0FzXdcitCrKElhdfQuVZDz6gzXVD85vbV2QIRcPEQZ5H2LEbPsoFK8sJU7WXV4xAMpmcnm2ZBrghywt9P54+WXt5L8eTX389krCpimGOjXjWZI+HD08UIPzHSDsbhTQ40BudT1IdvZUpVqbTv6MytaSEdk+Qt0ZIvWmNgGmTwOSYk74FlH3it04XQXpuq/8v8wLobIzxJsJGCDmXr9c+wehdgRMLEYXP6g/t5ZWmXYH29L1v9+g18Cny/QSIHob35ocfw39a2ThwkofXv8VvTA3Q2AAxlu5/PGWJuI84KNgHvW0hyQ7GMwjmmfhwTutZIWgpjyH3qCBEvSDhuK0uKF8CFV5dTYaYPmzm1ElY1ERUSsqVKLb4TWOgdQLF1Lxawgh3Pzn4w2pHA=" + stages: - build + - name: deploy + if: (branch=master AND type=push) OR tag is present jobs: include: @@ -19,5 +26,21 @@ jobs: - docker build --tag localheinz/composer-normalize-action . - docker run --interactive --rm --tty --workdir=/normalizer --volume ${PWD}:/normalizer localheinz/composer-normalize-action:latest + - stage: deploy + + language: ruby + + services: + - docker + + before_script: + - docker --version + - echo "$DOCKER_PASSWORD" | docker login --password-stdin --username "$DOCKER_USERNAME" + - if [[ -n "$TRAVIS_TAG" ]]; then DOCKER_TAG=$TRAVIS_TAG; elif [ "$TRAVIS_BRANCH" == "master" ]; then DOCKER_TAG=latest; fi + + script: + - docker build --tag localheinz/composer-normalize-action:$DOCKER_TAG . + - docker push localheinz/composer-normalize-action + notifications: email: false