Skip to content

Commit dd858da

Browse files
authored
Add job summary for Gemini CLI execution (#423)
1 parent 87c4941 commit dd858da

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

action.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,41 @@ runs:
355355
fi
356356
echo "EOF" >> "${GITHUB_OUTPUT}"
357357
358+
# Generate Job Summary
359+
if [[ -n "${GITHUB_STEP_SUMMARY:-}" ]]; then
360+
{
361+
echo "### Gemini CLI Execution"
362+
echo
363+
echo "#### Prompt"
364+
echo
365+
echo "\`\`\`"
366+
echo "${PROMPT}"
367+
echo "\`\`\`"
368+
echo
369+
if [[ -n "${RESPONSE}" ]]; then
370+
echo "#### Response"
371+
echo
372+
echo "${RESPONSE}"
373+
echo
374+
fi
375+
if [[ -n "${ERROR_JSON}" ]]; then
376+
echo "#### Error"
377+
echo
378+
echo "\`\`\`json"
379+
echo "${ERROR_JSON}"
380+
echo "\`\`\`"
381+
echo
382+
elif [[ "${FAILED}" == "true" ]]; then
383+
echo "#### Error Output"
384+
echo
385+
echo "\`\`\`"
386+
cat "${TEMP_STDERR}"
387+
echo "\`\`\`"
388+
echo
389+
fi
390+
} >> "${GITHUB_STEP_SUMMARY}"
391+
fi
392+
358393
if [[ "${FAILED}" = true ]]; then
359394
# If we have a structured error from JSON, use it for the error message
360395
if [[ -n "${ERROR_JSON}" ]]; then

0 commit comments

Comments
 (0)