Changing comment step.
This commit is contained in:
@@ -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 "<details><summary>🪶 Click to expand full plan output</summary>"
|
||||
echo ""
|
||||
echo '```hcl'
|
||||
cat ${GITHUB_WORKSPACE}/cloudflare/cloudflare.tfplan # <-- read file directly, ACT-safe
|
||||
echo '```'
|
||||
echo ""
|
||||
echo "</details>"
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user