Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
… into zip_r
  • Loading branch information
arnol377 committed Aug 15, 2024
2 parents 44acff0 + c38a17e commit 8bf191c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions workflows/terraform-plan.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ jobs:
- uses: actions/github-script@v7
if: github.event_name == 'pull_request'
env:
PLAN: "terraform\n${{ steps.plan.outputs.stdout }}"
PLAN: "terraform\n$${{ steps.plan.outputs.stdout }}"
with:
github-token: ${{ secrets.GH_TOKEN }}
github-token: $${{ secrets.GH_TOKEN }}
script: |
// 1. Retrieve existing bot comments for the PR
const { data: comments } = await github.rest.issues.listComments({
Expand All @@ -83,28 +83,28 @@ jobs:
})

// 2. Prepare format of the comment
const output = `#### Terraform Format and Style 🖌\`${{ steps.fmt.outcome }}\`
#### Terraform Initialization ⚙️\`${{ steps.init.outcome }}\`
#### Terraform Validation 🤖\`${{ steps.validate.outcome }}\`
const output = `#### Terraform Format and Style 🖌\`$${{ steps.fmt.outcome }}\`
#### Terraform Initialization ⚙️\`$${{ steps.init.outcome }}\`
#### Terraform Validation 🤖\`$${{ steps.validate.outcome }}\`
<details><summary>Validation Output</summary>

\`\`\`\n
${{ steps.validate.outputs.stdout }}
$${{ steps.validate.outputs.stdout }}
\`\`\`

</details>

#### Terraform Plan 📖\`${{ steps.plan.outcome }}\`
#### Terraform Plan 📖\`$${{ steps.plan.outcome }}\`

<details><summary>Show Plan</summary>

\`\`\`\n
${process.env.PLAN}
$${process.env.PLAN}
\`\`\`

</details>

*Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`, Working Directory: \`${{ env.tf_actions_working_dir }}\`, Workflow: \`${{ github.workflow }}\`*`;
*Pusher: @$${{ github.actor }}, Action: \`$${{ github.event_name }}\`, Working Directory: \`$${{ env.tf_actions_working_dir }}\`, Workflow: \`$${{ github.workflow }}\`*`;

// 3. If we have a comment, update it, otherwise create a new one
if (botComment) {
Expand Down

0 comments on commit 8bf191c

Please sign in to comment.