From 83c11117fe9146f9608c8bd91952e3dc169e5922 Mon Sep 17 00:00:00 2001 From: pgijsbertsen <117165507+pgijsbertsen@users.noreply.github.com> Date: Tue, 7 Apr 2026 10:09:36 +0200 Subject: [PATCH] feat: Filter summary in all workflows --- .forgejo/workflows/tofu-apply-k8s-wheatley.yaml | 4 +++- .forgejo/workflows/tofu-apply-templates.yaml | 4 +++- .forgejo/workflows/tofu-plan-templates.yaml | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) 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 \