From 381d1b05132e770be2d75a5bf8c20b976c0152bc Mon Sep 17 00:00:00 2001 From: Steven Ma Date: Tue, 31 Oct 2023 13:25:26 -0700 Subject: [PATCH] Simplifying github script --- .github/workflows/terraform.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml index 4d0aec6..9c5e801 100644 --- a/.github/workflows/terraform.yml +++ b/.github/workflows/terraform.yml @@ -60,12 +60,15 @@ jobs: # Add a comment to pull requests with plan results - uses: actions/github-script@v6 # if: github.event_name == 'pull_request' - id: test + id: comment with: - script: return "Hello!" - result-encoding: string - - name: add-plan-comment - run: echo "${{steps.test.outputs.result}}" + script: | + github.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: 'test' + }) # id: comment # env: # PLAN: "terraform\n${{ steps.plan.outputs.stdout }}" @@ -89,7 +92,7 @@ jobs: # issue_number: context.issue.number, # owner: context.repo.owner, # repo: context.repo.repo, - # body: output + # body: 'test' # }) # On push to main, build or change infrastructure according to Terraform configuration files