Update README.md example to fix escaping issues.

Sometimes (on later versions of terraform) terraform will output warnings regarding templating which include the ${} pattern. In a template, the contents are interpreted as js which will almost always fail.
This commit is contained in:
Alexander Lyon 2020-11-26 10:55:24 +00:00 committed by GitHub
parent 4c5048fbaf
commit 08d2b8ab4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -113,14 +113,24 @@ steps:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const validate = ${{ toJson(steps.validate.outputs.stdout) }};
const plan = ${{ toJson(steps.plan.outputs.stdout) }};
const output = `#### Terraform Format and Style 🖌\`${{ steps.fmt.outcome }}\`
#### Terraform Initialization ⚙️\`${{ steps.init.outcome }}\`
#### Terraform Validation 🤖${{ steps.validate.outputs.stdout }}
#### Terraform Validation 🤖\`${{ steps.validate.outcome }}\`
<details><summary>Show Validation</summary>
\`\`\`${validate}\`\`\`
</details>
#### Terraform Plan 📖\`${{ steps.plan.outcome }}\`
<details><summary>Show Plan</summary>
\`\`\`${process.env.PLAN}\`\`\`
\`\`\`terraform\n${plan}\`\`\`
</details>