diff --git a/scripts/wait-for-workflow.sh b/scripts/wait-for-workflow.sh index b2e446e..b91ffee 100644 --- a/scripts/wait-for-workflow.sh +++ b/scripts/wait-for-workflow.sh @@ -9,10 +9,8 @@ counter=0 # Get the current time in ISO 8601 format current_time=$(date -u +"%Y-%m-%dT%H:%M:%SZ") -# If REF is empty, use github.ref -if [ -z "$REF" ]; then - REF="${GITHUB_REF}" -else +# Check if REF has the prefix "refs/heads/" and append it if not +if [[ ! "$REF" =~ ^refs/heads/ ]]; then REF="refs/heads/$REF" fi