From 6cd2a490c5bad9fb336c68a663777272e4ee61dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Kr=C3=A4ml?= Date: Fri, 7 Nov 2025 14:34:29 +0100 Subject: [PATCH] fix(downstream): downstream old logic --- downstream/wait.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/downstream/wait.bash b/downstream/wait.bash index b670d81..e2a25cb 100755 --- a/downstream/wait.bash +++ b/downstream/wait.bash @@ -21,7 +21,7 @@ on_sigterm() { } fail() { - if [[ -z "${DOWNSTREAM_RUN_ID}" ]]; then + if [[ -z "${DOWNSTREAM_RUN_ID}" || ! "${DOWNSTREAM_RUN_ID}" =~ "^[0-9]+$" ]]; then echo "Failed to find run id in downstream" exit 1 fi @@ -62,7 +62,7 @@ while true; do if [[ -n $job_id ]]; then # TODO: Remove old logic when no branches are outdated - if [[ ${NEW_LOGIC} -ne 1 && ! $(gh run view ${RUN} --repo $REPO --log -j $job_id | grep -q ${RUN_ID}) ]]; then + if [[ ${NEW_LOGIC} -ne 1 ]] && ! gh run view ${RUN} --repo $REPO --log -j $job_id | grep -q ${RUN_ID}; then continue fi # Break out of for and until loop