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
Add `output_to_file` input that redirects all output to files and returns
file paths as step outputs instead of content. When enabled with
`gemini_debug: true`, debug output goes to files without console streaming,
keeping GITHUB_OUTPUT well under the ~1MB platform limit.
New outputs: `output_mode` (content/file) and `artifacts_dir` (path to
gemini-artifacts/). Full backwards compatibility when not set.
Ref: #479
Copy file name to clipboardExpand all lines: action.yml
+73-33Lines changed: 73 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -83,6 +83,10 @@ inputs:
83
83
description: 'Whether to upload artifacts to the github action.'
84
84
required: false
85
85
default: 'false'
86
+
output_to_file:
87
+
description: 'When true, redirect all output to files and return file paths as step outputs instead of content. Useful when gemini_debug is true to avoid exceeding GitHub Actions output limits.'
88
+
required: false
89
+
default: 'false'
86
90
use_pnpm:
87
91
description: 'Whether or not to use pnpm instead of npm to install gemini-cli'
88
92
required: false
@@ -107,6 +111,12 @@ outputs:
107
111
error:
108
112
description: 'The error output from the Gemini CLI execution, if any.'
# Run Gemini CLI with the provided prompt, using JSON output format
305
315
# We capture stdout (JSON) to TEMP_STDOUT and stderr to TEMP_STDERR
306
-
if [[ "${GEMINI_DEBUG}" = true ]]; then
316
+
if [[ "${GEMINI_DEBUG}" = true ]] && [[ "${OUTPUT_TO_FILE}" = true ]]; then
317
+
echo "::notice::Gemini CLI debug output redirected to files (gemini-artifacts/)"
318
+
if ! gemini --debug --yolo --prompt "${PROMPT}" --output-format json 2> "${TEMP_STDERR}" 1> "${TEMP_STDOUT}"; then
319
+
FAILED=true
320
+
fi
321
+
elif [[ "${GEMINI_DEBUG}" = true ]]; then
307
322
echo "::warning::Gemini CLI debug logging is enabled. This will stream responses, which could reveal sensitive information if processed with untrusted inputs."
308
323
echo "::: Start Gemini CLI STDOUT :::"
309
324
if ! gemini --debug --yolo --prompt "${PROMPT}" --output-format json 2> >(tee "${TEMP_STDERR}" >&2) | tee "${TEMP_STDOUT}"; then
@@ -349,23 +364,38 @@ runs:
349
364
fi
350
365
351
366
352
-
# Set the captured response as a step output, supporting multiline
0 commit comments