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.
This commit is contained in:
Artur Klauser 2020-04-06 07:40:50 +02:00
commit 7963b52b8a
No known key found for this signature in database
GPG key ID: 70B7884D56F42F15

View file

@ -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