chore: Only use plan summary in comment
All checks were successful
Tofu Plan k8s-wheatley / tofu-plan-k8s-wheatley (pull_request) Successful in 1m3s

This commit is contained in:
Peter 2026-04-03 10:11:09 +02:00
parent 3540cf61e3
commit a7ad1647aa
Signed by: Peter
SSH key fingerprint: SHA256:B5tYaxBExaDm74r1px9iVeZ6F/ZDiyiy9SbBqfZYrvg

View file

@ -74,11 +74,13 @@ jobs:
<details><summary>Show Plan</summary> <details><summary>Show Plan</summary>
``` ```
${{ steps.plan.outputs.stdout }} PLAN_PLACEHOLDER
``` ```
</details> </details>
run: | run: |
filtered_plan=$(echo "${{ steps.plan.outputs.stdout }}" | awk '/Refreshing state/{found=0} /^$/{if(!found)print; next} {if(found)print} /Refreshing state/{found=1}' | sed '/./,$!d')
COMMENT_BODY="${COMMENT_BODY//'PLAN_PLACEHOLDER'/$filtered_plan}"
payload=$(jq -Rs --arg body "$COMMENT_BODY" '{body: $body}' <<< "$COMMENT_BODY") payload=$(jq -Rs --arg body "$COMMENT_BODY" '{body: $body}' <<< "$COMMENT_BODY")
existing_comment=$(curl -s \ existing_comment=$(curl -s \