diff --git a/.forgejo/workflows/tofu-apply-k8s-wheatley.yaml b/.forgejo/workflows/tofu-apply-k8s-wheatley.yaml index 3ececfc..199cfff 100644 --- a/.forgejo/workflows/tofu-apply-k8s-wheatley.yaml +++ b/.forgejo/workflows/tofu-apply-k8s-wheatley.yaml @@ -87,11 +87,13 @@ jobs:
Show Apply ``` - ${{ steps.apply.outputs.stdout }} + APPLY_PLACEHOLDER ```
run: | + filtered_apply=$(echo "${{ steps.apply.outputs.stdout }}" | grep -vE '^\s*(module\.|data\.|resource\.).+: (Reading\.\.\.|Read complete after|Refreshing state)' | sed '/./,$!d') + COMMENT_BODY="${COMMENT_BODY//'APPLY_PLACEHOLDER'/$filtered_apply}" payload=$(jq -Rs --arg body "$COMMENT_BODY" '{body: $body}' <<< "$COMMENT_BODY") existing_comment=$(curl -s \ diff --git a/.forgejo/workflows/tofu-apply-templates.yaml b/.forgejo/workflows/tofu-apply-templates.yaml index fb94da2..b199f64 100644 --- a/.forgejo/workflows/tofu-apply-templates.yaml +++ b/.forgejo/workflows/tofu-apply-templates.yaml @@ -88,11 +88,13 @@ jobs:
Show Apply ``` - ${{ steps.apply.outputs.stdout }} + APPLY_PLACEHOLDER ```
run: | + filtered_apply=$(echo "${{ steps.apply.outputs.stdout }}" | grep -vE '^\s*(module\.|data\.|resource\.).+: (Reading\.\.\.|Read complete after|Refreshing state)' | sed '/./,$!d') + COMMENT_BODY="${COMMENT_BODY//'APPLY_PLACEHOLDER'/$filtered_apply}" payload=$(jq -Rs --arg body "$COMMENT_BODY" '{body: $body}' <<< "$COMMENT_BODY") existing_comment=$(curl -s \ diff --git a/.forgejo/workflows/tofu-plan-templates.yaml b/.forgejo/workflows/tofu-plan-templates.yaml index 4ac2aeb..2bab873 100644 --- a/.forgejo/workflows/tofu-plan-templates.yaml +++ b/.forgejo/workflows/tofu-plan-templates.yaml @@ -75,11 +75,13 @@ jobs:
Show Plan ``` - ${{ steps.plan.outputs.stdout }} + PLAN_PLACEHOLDER ```
run: | + filtered_plan=$(echo "${{ steps.plan.outputs.stdout }}" | grep -vE '^\s*(module\.|data\.|resource\.).+: (Reading\.\.\.|Read complete after|Refreshing state)' | sed '/./,$!d') + COMMENT_BODY="${COMMENT_BODY//'PLAN_PLACEHOLDER'/$filtered_plan}" payload=$(jq -Rs --arg body "$COMMENT_BODY" '{body: $body}' <<< "$COMMENT_BODY") existing_comment=$(curl -s \