From 714876e3d0efc60c6be7cea4194cb5dc7d28d36c Mon Sep 17 00:00:00 2001 From: 1138-4EB <1138-4EB@users.noreply.github.com> Date: Thu, 16 Aug 2018 04:55:03 +0100 Subject: [PATCH] chore: fix release conditions --- .travis.yml | 7 ++++--- build/push_images.sh | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) create mode 100755 build/push_images.sh diff --git a/.travis.yml b/.travis.yml index e0647813..a65ef550 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,17 +35,18 @@ jobs: branch: master - stage: release script: - - ./build/docker_login.sh - docker run --rm -itv $(pwd):$WDIR -v /var/run/docker.sock:/var/run/docker.sock filebrowser/dev goreleaser - - docker logout + - ./build/push_images.sh - ./build/push_ricebox.sh if: tag IS present deploy: provider: releases + skip_cleanup: true api_key: secure: GCURbl9xmjOmeNc7cYSvfSwbEp46cacWmJRczcsU6rQa0aWqzjELYdyIsl6HWW+o0dzuZvbWRD6muxYqIud92oPLYDuXSnra9tM3mCjswrjiPCJ57bksWkSPBfFQcxIyB6c3o+A/FMnX3nnSE/2r5HYZnPNFbEcBbC7WSgwx9ejXUuyWn1PUFK9YQWANdl6J7b7EKsk+9MxS9Pmw6M2ycBwX8ScUQdofkUPvR/nqlXISm+3hs30VubqQi9Ha6DM9Bw3aFK3/Ts/ujCOxP1ZoMCBZ6tfnaQOElIG96WTwnt77eDYlZezBOLym3Z18iif+Qny+XndFKDbexaiUT06VlWFXCKtt3iLs6HJwRcjmiHmB0Z3v+W4cKPl3cEyxxrU2aal54k1PBhU+5L0Xc8ileKbDMYg5tps88zWHNefeZVfaxYSVrmUHkuygMe481oaBLacDXTxs4t6XEpStREuLmvx9NLTwTFAbWjMNM0PqlueDMxO4bdwNvzXg/TcKLWV9FezqAlre8lFNZK5wX6lKFVSZ3hFjxCfwrJL2cPwg5A8Yd5EOC4Nh81WdgYuFGOxZzMAoSJlaVRvQS1trCUP/++ONnDep3ExSxvw4B7vijGZWeXUhrOMiPQHXu+t6BnrlnDjQ4gi44QTW0y/iM2WC2DBKfgYjAKwyHx13hFrmOCg= file: "dist/*.*" file_glob: true on: repo: filebrowser/filebrowser - branch: master + all_branches: true + tags: true diff --git a/build/push_images.sh b/build/push_images.sh new file mode 100755 index 00000000..a6e45d61 --- /dev/null +++ b/build/push_images.sh @@ -0,0 +1,14 @@ +#! /bin/sh + +set -e + +cd $(dirname $0) + +./docker_login.sh + +for tag in `echo $(docker images filebrowser/filebrowser* | awk -F ' ' '{print $1 ":" $2}') | cut -d ' ' -f2-`; do + if [ "$tag" = "REPOSITORY:TAG" ]; then break; fi + docker push $tag +done + +docker logout