From a7f2ef98bd9018697f8d45c3212b1866fc4c7463 Mon Sep 17 00:00:00 2001 From: Vladimir Kotal Date: Thu, 1 Aug 2024 12:21:00 +0200 Subject: [PATCH] fix the URL also do not print if GITHUB_OUTPUT env var is empty --- dev/get_upload_url.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dev/get_upload_url.sh b/dev/get_upload_url.sh index 2d772183400..633bd6355cb 100755 --- a/dev/get_upload_url.sh +++ b/dev/get_upload_url.sh @@ -7,6 +7,8 @@ # echo "Getting upload URL for $OPENGROK_TAG" -upload_url=$( curl -s https://api.github.com/repos/oracle/opengrok/releases/$OPENGROK_TAG | jq -r .upload_url ) -echo "Got $upload_url" -echo "upload_url=$upload_url" >> $GITHUB_OUTPUT" +upload_url=$( curl -s https://api.github.com/repos/oracle/opengrok/releases/tags/$OPENGROK_TAG | jq -r .upload_url ) +echo "Got '$upload_url'" +if [[ -n $GITHUB_OUTPUT ]]; then + echo "upload_url=$upload_url" >> $GITHUB_OUTPUT +fi