From a166e4d783cc8c70e366aa40578293bd562e0def Mon Sep 17 00:00:00 2001 From: Florian Reinhold Date: Mon, 11 Apr 2022 20:55:28 +0200 Subject: [PATCH] feat(ops.management-cluster): pipe terraform plan output to pull request --- ...nagement-cluster-terraform-plan-on-hcloud.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/management-cluster-terraform-plan-on-hcloud.yaml b/.github/workflows/management-cluster-terraform-plan-on-hcloud.yaml index 668676e..4230244 100644 --- a/.github/workflows/management-cluster-terraform-plan-on-hcloud.yaml +++ b/.github/workflows/management-cluster-terraform-plan-on-hcloud.yaml @@ -66,4 +66,17 @@ jobs: -var prefix="${{ inputs.prefix }}" \ -var hcloud_secret="${{ secrets.hcloud_secret }}" \ -var hcloud_ssh_key_private="${{ secrets.hcloud_ssh_key_private }}" \ - -var hcloud_ssh_key_public="${{ secrets.hcloud_ssh_key_public }}" + -var hcloud_ssh_key_public="${{ secrets.hcloud_ssh_key_public }}" \ + -no-color + + echo "::set-output name=terraform-plan::$(cat plan.out)" + id: run_plan + + - name: Send plan to PR + uses: thollander/actions-comment-pull-request@v1.1.0 + with: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + message: | + ```bash + ${{join(steps.run_plan.outputs.*, '\n')}} + ```