Skip to content

Commit 92495e5

Browse files
committed
fix(ci): don't act on invalid github response
1 parent b621661 commit 92495e5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/actions/update-with-latest-versions/entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ update_version() {
5151
LATEST_VERSION_TAG=`curl -L -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/${INPUT_REPOSITORY}/releases/latest" | jq --raw-output ".tag_name"`
5252
LATEST_VERSION_NUMBER=${LATEST_VERSION_TAG:1}
5353

54+
if [ "$LATEST_VERSION_TAG" = "null" ]; then
55+
echo "https://api.github.com returned null, please re-run this job, if the problem persists this script needs to be rewritten"
56+
exit 1
57+
fi
58+
5459
echo "Updating documentation files that rely on ${INPUT_VERSION_IDENTIFIER} to ${LATEST_VERSION_TAG}"
5560

5661
while read -r file; do

0 commit comments

Comments
 (0)