We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 389e68f commit d0c429cCopy full SHA for d0c429c
build.sh
@@ -118,6 +118,14 @@ NETBOX_PATH="${NETBOX_PATH-.netbox}"
118
# Fetching the NetBox source
119
###
120
if [ "${2}" != "--push-only" ] && [ -z "${SKIP_GIT}" ]; then
121
+ REMOTE_EXISTS=$(git ls-remote --heads --tags "${URL}" "${NETBOX_BRANCH}" | wc -l)
122
+ if [ "${REMOTE_EXISTS}" != "1" ]; then
123
+ echo "❌ Remote branch '${NETBOX_BRANCH}' not found in '${URL}'; Nothing to do"
124
+ if [ -n "${GH_ACTION}" ]; then
125
+ echo "::set-output name=skipped::true"
126
+ fi
127
+ exit 0
128
129
echo "🌐 Checking out '${NETBOX_BRANCH}' of NetBox from the url '${URL}' into '${NETBOX_PATH}'"
130
if [ ! -d "${NETBOX_PATH}" ]; then
131
$DRY git clone -q --depth 10 -b "${NETBOX_BRANCH}" "${URL}" "${NETBOX_PATH}"
0 commit comments