Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions downstream/wait.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down