netbox-docker/hooks/push
Christian Mäder de1e3676eb Fix push
2019-10-15 12:28:04 +02:00

15 lines
361 B
Bash
Executable File

#!/bin/bash
. hooks/common
if [ "${SOURCE_BRANCH}" == "master" ] || [ "${DEBUG}" == "true" ]; then
if [ "${SOURCE_BRANCH}" != "master" ]; then
echo "⚠️⚠️⚠️ Would exit, but DEBUG is '${DEBUG}'".
fi
run_build --push-only
else
echo "⚠️⚠️⚠️ Only pushing on 'main' branch, but current branch is '${SOURCE_BRANCH}'"
exit 0
fi