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 status=$(gh run list --workflow changelog.yml --limit 1 --json status -q '.[0].status' --repo "$target_repo" --ref main 2>/dev/null) && [ -n "$status" ]; then
207
+
conclusion=$(gh run list --workflow changelog.yml --limit 1 --json conclusion -q '.[0].conclusion' --repo "$target_repo" --ref main 2>/dev/null)
208
+
else
209
+
# Fallback: Try using workflow ID from previous step
210
+
if [ -n "$workflow_id" ]; then
211
+
echo "::info::Attempt $attempt/$max_attempts: changelog.yml not found, trying workflow ID $workflow_id"
212
+
run_data=$(gh run list --repo "$target_repo" --limit 10 --json status,conclusion,workflowDatabaseId 2>/dev/null | jq -r ".[] | select(.workflowDatabaseId == $workflow_id) | [.status, .conclusion] | @tsv" | head -1)
213
+
if [ -n "$run_data" ]; then
214
+
status=$(echo "$run_data" | cut -f1)
215
+
conclusion=$(echo "$run_data" | cut -f2)
216
+
fi
217
+
fi
201
218
fi
202
219
203
-
# Try to get the status of the most recent run for our workflow
204
-
run_data=$(gh run list --repo "$target_repo" --limit 10 --json status,conclusion,workflowDatabaseId 2>/dev/null | jq -r ".[] | select(.workflowDatabaseId == $workflow_id) | [.status, .conclusion] | @tsv" | head -1)
205
-
206
-
if [ -z "$run_data" ]; then
207
-
echo "⏳ Attempt $attempt/$max_attempts: No runs found for workflow ID $workflow_id yet. Checking again..."
220
+
# If we still couldn't get status, continue waiting
221
+
if [ -z "$status" ]; then
222
+
echo "::warning::Attempt $attempt/$max_attempts: Could not find workflow '$workflow_name' or no runs exist yet. Checking again..."
0 commit comments