Stripping ANSI codes from TF output.
This commit is contained in:
@@ -114,17 +114,11 @@ jobs:
|
|||||||
working-directory: .
|
working-directory: .
|
||||||
chdir: cloudflare
|
chdir: cloudflare
|
||||||
|
|
||||||
- run: echo "${{ steps.tofu-init.outputs.init-output }}"
|
- name: Strip ANSI codes
|
||||||
|
id: plain-tofu-init
|
||||||
- name: ANSI to HTML
|
uses: marcransome/remove-ansi-colors@v1.7.56
|
||||||
id: ansi-to-html-init
|
|
||||||
uses: https://git.trez.wtf/Trez/actions-ansi-to-html@v1.0.3
|
|
||||||
env:
|
|
||||||
ACTIONS_STEP_DEBUG: true
|
|
||||||
with:
|
with:
|
||||||
input: ${{ steps.tofu-init.outputs.init-output }}
|
colored: ${{ steps.tofu-init.outputs.init-output }}
|
||||||
|
|
||||||
- run: echo "${{ steps.ansi-to-html-init.outputs.contents }}"
|
|
||||||
|
|
||||||
- name: Tofu PR Commenter
|
- name: Tofu PR Commenter
|
||||||
uses: https://git.trez.wtf/Trez/tf-pr-commenter@main
|
uses: https://git.trez.wtf/Trez/tf-pr-commenter@main
|
||||||
@@ -135,7 +129,7 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.BOT_GITEA_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.BOT_GITEA_TOKEN }}
|
||||||
with:
|
with:
|
||||||
commenter_type: init
|
commenter_type: init
|
||||||
commenter_input: ${{ steps.tofu-init.outputs.init-output }}
|
commenter_input: ${{ steps.plain-tofu-init.outputs.init-uncolored }}
|
||||||
commenter_exitcode: ${{ steps.tofu-init.outputs.exitcode }}
|
commenter_exitcode: ${{ steps.tofu-init.outputs.exitcode }}
|
||||||
git_token: ${{ secrets.BOT_GITEA_TOKEN }}
|
git_token: ${{ secrets.BOT_GITEA_TOKEN }}
|
||||||
pr_comments_url: ${{ env.PR_COMMENTS_URL }}
|
pr_comments_url: ${{ env.PR_COMMENTS_URL }}
|
||||||
@@ -150,35 +144,31 @@ jobs:
|
|||||||
chdir: cloudflare
|
chdir: cloudflare
|
||||||
out: cloudflare.tfplan
|
out: cloudflare.tfplan
|
||||||
|
|
||||||
- run: pwd
|
- name: Strip ANSI codes
|
||||||
|
id: plain-tofu-plan
|
||||||
- name: ANSI to HTML
|
uses: marcransome/remove-ansi-colors@v1.7.56
|
||||||
id: ansi-to-html-plan
|
|
||||||
uses: https://git.trez.wtf/Trez/actions-ansi-to-html@v1.0.3
|
|
||||||
env:
|
|
||||||
ACTIONS_STEP_DEBUG: true
|
|
||||||
with:
|
with:
|
||||||
path: cloudflare/cloudflare.tfplan
|
colored: ${{ steps.tofu-plan.outputs.plan-output }}
|
||||||
|
|
||||||
- name: Comment PR with execution number
|
# - name: Comment PR with execution number
|
||||||
uses: thollander/actions-comment-pull-request@v3
|
# uses: thollander/actions-comment-pull-request@v3
|
||||||
with:
|
|
||||||
file-path: cloudflare/cloudflare.tfplan
|
|
||||||
|
|
||||||
# - name: Tofu PR Commenter
|
|
||||||
# uses: https://git.trez.wtf/Trez/tf-pr-commenter@main
|
|
||||||
# env:
|
|
||||||
# GITEA_API_URL: ${{ gitea.api_url }}
|
|
||||||
# GITEA_REPOSITORY: ${{ github.repository }}
|
|
||||||
# GITEA_PULL_REQUEST_ID: ${{ github.event.pull_request.number }}
|
|
||||||
# GITHUB_TOKEN: ${{ secrets.BOT_GITEA_TOKEN }}
|
|
||||||
# with:
|
# with:
|
||||||
# commenter_type: plan
|
# file-path: cloudflare/cloudflare.tfplan
|
||||||
# commenter_input: ${{ steps.tofu-plan.outputs.plan-output }}
|
|
||||||
# commenter_exitcode: ${{ steps.tofu-plan.outputs.exitcode }}
|
- name: Tofu PR Commenter
|
||||||
# git_token: ${{ secrets.BOT_GITEA_TOKEN }}
|
uses: https://git.trez.wtf/Trez/tf-pr-commenter@main
|
||||||
# pr_comments_url: ${{ env.PR_COMMENTS_URL }}
|
env:
|
||||||
# working_directory: cloudflare
|
GITEA_API_URL: ${{ gitea.api_url }}
|
||||||
|
GITEA_REPOSITORY: ${{ github.repository }}
|
||||||
|
GITEA_PULL_REQUEST_ID: ${{ github.event.pull_request.number }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.BOT_GITEA_TOKEN }}
|
||||||
|
with:
|
||||||
|
commenter_type: plan
|
||||||
|
commenter_input: ${{ steps.plain-tofu-plan.outputs.uncolored }}
|
||||||
|
commenter_exitcode: ${{ steps.tofu-plan.outputs.exitcode }}
|
||||||
|
git_token: ${{ secrets.BOT_GITEA_TOKEN }}
|
||||||
|
pr_comments_url: ${{ env.PR_COMMENTS_URL }}
|
||||||
|
working_directory: cloudflare
|
||||||
|
|
||||||
# - name: Wait for manual approval
|
# - name: Wait for manual approval
|
||||||
# uses: trstringer/manual-approval@v1
|
# uses: trstringer/manual-approval@v1
|
||||||
|
|||||||
Reference in New Issue
Block a user