From 089d978e3314f75afdd98d495f068c601eda9784 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Mon, 3 Nov 2025 17:22:28 -0500 Subject: [PATCH] Changing comment step. --- .../cloudflare-auto-pr-tofu-pipeline.yml | 37 +++---------------- 1 file changed, 6 insertions(+), 31 deletions(-) diff --git a/.gitea/workflows/cloudflare-auto-pr-tofu-pipeline.yml b/.gitea/workflows/cloudflare-auto-pr-tofu-pipeline.yml index b6879d9..f7ac68d 100644 --- a/.gitea/workflows/cloudflare-auto-pr-tofu-pipeline.yml +++ b/.gitea/workflows/cloudflare-auto-pr-tofu-pipeline.yml @@ -105,7 +105,7 @@ jobs: chdir: cloudflare - name: Tofu Plan - id: tofu_plan + id: tofu-plan continue-on-error: true uses: dnogu/tofu-plan@v1 with: @@ -113,37 +113,12 @@ jobs: chdir: cloudflare out: cloudflare.tfplan - - name: Build Markdown PR comment from plan file - run: | - mkdir -p tmp - { - echo "## 🧩 OpenTofu Plan — Cloudflare" - echo "**Branch:** \`${{ github.ref_name }}\`" - echo "**Exit Code:** \`${{ steps.tofu_plan.outputs.exitcode }}\`" - echo "**Working Directory:** \`cloudflare\`" - echo "" - echo "
🪶 Click to expand full plan output" - echo "" - echo '```hcl' - cat ${GITHUB_WORKSPACE}/cloudflare/cloudflare.tfplan # <-- read file directly, ACT-safe - echo '```' - echo "" - echo "
" - echo "" - echo "*(This plan was automatically generated by the workflow.)*" - } > tmp/tofu-plan.md - echo "Markdown PR comment built: tmp/tofu-plan.md" - - - name: Comment full Tofu Plan on PR (Gitea safe) - uses: https://git.trez.wtf/Trez.One/git-auto-comment@main + - name: Tofu PR Commenter + uses: alexnorell/tofu-pr-commenter@v2.0.0 with: - platform: gitea - api_url: https://git.trez.wtf/api/v1 - token: ${{ secrets.BOT_GITEA_TOKEN }} - pr_index: ${{ needs.check-and-create-pr.outputs.pr_number }} - repo_owner: ${{ github.repository_owner }} - repo_name: ${{ steps.env-vault-vars.outputs.repo_name }} - comment_template_path: tmp/tofu-plan.md + commenter_type: plan + commenter_input: ${{ steps.tofu-plan.outputs.plan-output }} + commenter_exitcode: ${{ steps.tofu-plan.outputs.exitcode }} - name: Wait for manual approval uses: trstringer/manual-approval@v1