Changed CI script

This commit is contained in:
Quentin McGaw (desktop)
2020-02-22 17:32:05 +00:00
parent 9669938703
commit 16995e1d93

14
ci.sh
View File

@@ -1,7 +1,7 @@
#!/bin/bash
if [ "$TRAVIS_PULL_REQUEST" = "true" ] || [ "$TRAVIS_BRANCH" != "master" ]; then
echo "Building without pushing to Docker Hub"
if [ "$TRAVIS_PULL_REQUEST" = "true" ]; then
echo "Building pull request without pushing to Docker Hub"
docker buildx build \
--progress plain \
--platform=linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6,linux/ppc64le,linux/s390x \
@@ -9,7 +9,15 @@ if [ "$TRAVIS_PULL_REQUEST" = "true" ] || [ "$TRAVIS_BRANCH" != "master" ]; then
exit $?
fi
echo $DOCKER_PASSWORD | docker login -u qmcgaw --password-stdin &> /dev/null
TAG="${TRAVIS_TAG:-latest}"
TAG="$TRAVIS_TAG"
if [ -z $TAG ]; then
if [ "$TRAVIS_BRANCH" = "master" ]; then
TAG=latest
else
TAG="$TRAVIS_BRANCH"
fi
fi
echo "Building Docker images for \"$DOCKER_REPO:$TAG\""
docker buildx build \
--progress plain \