From 9741a63541ea38ae33b5c49836494b2306dbf06f Mon Sep 17 00:00:00 2001 From: Dave Arnold Date: Thu, 15 Aug 2024 12:53:14 -0700 Subject: [PATCH] Refactor image pipeline module names and update workflows --- workflows/terraform-plan.yaml.tpl | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/workflows/terraform-plan.yaml.tpl b/workflows/terraform-plan.yaml.tpl index 2906111..a354a76 100644 --- a/workflows/terraform-plan.yaml.tpl +++ b/workflows/terraform-plan.yaml.tpl @@ -73,4 +73,23 @@ jobs: %{ endif } run: terraform plan continue-on-error: true -L \ No newline at end of file + + - name: Update Pull Request + uses: CSVD/gh-actions-github-script@v6 + if: github.event_name == 'pull_request' + with: + github-token: $${{ secrets.GH_TOKEN }} + script: | + const output = `#### Terraform Format and Style 🖌\`$${{ steps.fmt.outcome }}\` + #### Terraform Initialization ⚙️\`$${{ steps.init.outcome }}\` + #### Terraform Validation 🤖\`$${{ steps.validate.outcome }}\` + #### Terraform Plan: + $${{ steps.plan.outcome }} + *Pushed by: @$${{ github.actor }}, Action: \`$${{ github.event_name }}\`*`; + + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: output + })