Improved check

Co-authored-by: Christian Mäder <cimnine@users.noreply.github.com>
This commit is contained in:
Tobias Genannt 2021-09-13 22:50:06 +02:00 committed by GitHub
parent d0c429c8a1
commit c4d545a256
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -119,7 +119,7 @@ NETBOX_PATH="${NETBOX_PATH-.netbox}"
###
if [ "${2}" != "--push-only" ] && [ -z "${SKIP_GIT}" ]; then
REMOTE_EXISTS=$(git ls-remote --heads --tags "${URL}" "${NETBOX_BRANCH}" | wc -l)
if [ "${REMOTE_EXISTS}" != "1" ]; then
if [ "${REMOTE_EXISTS}" == "0" ]; then
echo "❌ Remote branch '${NETBOX_BRANCH}' not found in '${URL}'; Nothing to do"
if [ -n "${GH_ACTION}" ]; then
echo "::set-output name=skipped::true"