You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if grep -q "HTTP 404" /tmp/ddb_publish_run_list_err.log; then
90
+
echo "[ddb-publish] Workflow '${workflow_file}' not found on default branch; trying next workflow candidate."
91
+
continue
92
+
fi
93
+
94
+
echo "ERROR: Failed to query workflow runs from '${ACTION_REPO}' for workflow '${workflow_file}'." >&2
95
+
cat /tmp/ddb_publish_run_list_err.log >&2 || true
96
+
echo "HINT: ensure the token has read access to '${ACTION_REPO}' and workflow permissions allow actions read." >&2
97
+
exit 1
98
+
fi
99
+
100
+
if [[ -n "${run_id_candidate}" && "${run_id_candidate}" != "null" ]]; then
101
+
run_id="${run_id_candidate}"
102
+
workflow_used="${workflow_file}"
103
+
break
104
+
fi
105
+
done
88
106
89
107
if [[ -z "${run_id}" || "${run_id}" == "null" ]]; then
90
-
echo "ERROR: Could not find a successful 'stage-3-build.yaml' run for branch '${branch}' in '${ACTION_REPO}' to download artifact '${WORKFLOW_ARTIFACT_NAME}'." >&2
108
+
echo "ERROR: Could not find a successful run on branch '${branch}' in '${ACTION_REPO}' containing artifact '${WORKFLOW_ARTIFACT_NAME}'. Checked workflows: stage-3-build.yaml, cicd-1-pull-request.yaml." >&2
91
109
exit 1
92
110
fi
93
111
94
-
echo "[ddb-publish] Downloading artifact '${WORKFLOW_ARTIFACT_NAME}' from workflow run ${run_id} in '${ACTION_REPO}'."
112
+
echo "[ddb-publish] Downloading artifact '${WORKFLOW_ARTIFACT_NAME}' from workflow run ${run_id} (${workflow_used}) in '${ACTION_REPO}'."
95
113
gh run download "${run_id}" --repo "${ACTION_REPO}" --name "${WORKFLOW_ARTIFACT_NAME}" --dir "${download_dir}"
0 commit comments