From 7963b52b8a061821159b63c792bfbd9a1925295d Mon Sep 17 00:00:00 2001 From: Artur Klauser Date: Mon, 6 Apr 2020 07:40:50 +0200 Subject: [PATCH] Skip out of deployment early if possible Don't waste CI time setting up the whole docker build machinery if we don't actually need it because there are no tags to deploy. --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d7d202b..1cf71ac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,9 +51,10 @@ jobs: - ./.github_deploy - stage: Deploy docker image - # Deploy only for pushes to master branch, not other branches, not PRs. + # Deploy only for pushes, not PRs, since PRs can't access Travis secrets. if: type = push script: + - if [ -z "$TAGS" ]; then exit 0; fi # Skip rest if nothing to deploy. - source ./.multi_arch_docker - set -ex; multi_arch_docker::main; set +x