mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2024-11-17 02:48:31 -07:00
26 lines
639 B
Bash
26 lines
639 B
Bash
|
#!/bin/sh -e
|
||
|
|
||
|
login() {
|
||
|
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
||
|
}
|
||
|
|
||
|
build_and_push() {
|
||
|
docker build -t koenkk/zigbee2mqtt:$1 -f $2 .
|
||
|
docker push koenkk/zigbee2mqtt:$1
|
||
|
}
|
||
|
|
||
|
push() {
|
||
|
docker build -t koenkk/zigbee2mqtt:$1
|
||
|
}
|
||
|
|
||
|
# Only update docker images if on master branch and not pull request
|
||
|
if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]
|
||
|
then
|
||
|
echo "Updating docker images!"
|
||
|
login
|
||
|
build_and_push latest docker/Dockerfile
|
||
|
build_and_push armv7hf docker/Dockerfile.armv7hf
|
||
|
else
|
||
|
echo "Not updating docker images, triggered by pull request or not on master branch"
|
||
|
fi
|