@@ -303,10 +303,7 @@ runs:
303
303
# Parse the tf.console.txt file, truncated for character limit.
304
304
console=$(head --bytes=42000 tf.console.txt)
305
305
if [[ ${#console} -eq 42000 ]]; then console="${console}"$'\n…'; fi
306
- { echo 'result<<EOTFVIAPR'
307
- echo "$console"
308
- echo EOTFVIAPR
309
- } >> "$GITHUB_OUTPUT"
306
+ echo "result<<EORESULTTFVIAPR"$'\n'"$console"$'\n'EORESULTTFVIAPR >> "$GITHUB_OUTPUT"
310
307
311
308
# Parse the tf.console.txt file for the summary.
312
309
summary=$(awk '/^(Error:|Plan:|Apply complete!|No changes.|Success)/ {line=$0} END {if (line) print line; else print "View output."}' tf.console.txt)
@@ -334,10 +331,7 @@ runs:
334
331
# Parse diff of changes, truncated for character limit.
335
332
diff_truncated=$(head --bytes=24000 tf.diff.txt)
336
333
if [[ ${#diff_truncated} -eq 24000 ]]; then diff_truncated="${diff_truncated}"$'\n…'; fi
337
- { echo 'diff<<EOTFVIAPR'
338
- echo "$diff_truncated"
339
- echo EOTFVIAPR
340
- } >> "$GITHUB_OUTPUT"
334
+ echo "diff<<EODIFFTFVIAPR"$'\n'"$diff_truncated"$'\n'EODIFFTFVIAPR >> "$GITHUB_OUTPUT"
341
335
342
336
diff="
343
337
<details><summary>Diff of ${diff_count} ${diff_change}.</summary>
@@ -362,7 +356,7 @@ runs:
362
356
if [[ "$tag_actor" == "true" ]]; then handle="@"; else handle=""; fi
363
357
364
358
# Collate body content.
365
- body=$(cat <<EOTFVIAPR
359
+ body=$(cat <<EOBODYTFVIAPR
366
360
<!-- placeholder-1 -->
367
361
\`\`\`fish
368
362
${command}
@@ -383,11 +377,12 @@ runs:
383
377
<!-- placeholder-5 -->
384
378
<!-- ${{ steps.identifier.outputs.name }} -->
385
379
<!-- placeholder-6 -->
386
- EOTFVIAPR
380
+ EOBODYTFVIAPR
387
381
)
388
382
389
383
# Post output to job summary.
390
384
echo "$body" >> $GITHUB_STEP_SUMMARY
385
+ echo "comment_body<<EOCOMMENTTFVIAPR"$'\n'"$body"$'\n'EOCOMMENTTFVIAPR >> "$GITHUB_OUTPUT"
391
386
392
387
# Post PR comment if configured and PR exists.
393
388
if [[ "$create_comment" == "true" && "${{ steps.identifier.outputs.pr }}" != "0" ]]; then
@@ -431,6 +426,9 @@ outputs:
431
426
command :
432
427
description : " Input of the last TF command."
433
428
value : ${{ steps.post.outputs.command }}
429
+ comment-body :
430
+ description : " Body of the PR comment."
431
+ value : ${{ steps.post.outputs.comment_body }}
434
432
comment-id :
435
433
description : " ID of the PR comment."
436
434
value : ${{ steps.post.outputs.comment_id }}
0 commit comments