mirror of
https://github.com/hashicorp/setup-terraform.git
synced 2025-12-26 13:03:37 +00:00
Update README.md
replaced the existing example
This commit is contained in:
parent
7810ad5077
commit
72297fe9b1
1 changed files with 0 additions and 28 deletions
28
README.md
28
README.md
|
|
@ -80,34 +80,6 @@ steps:
|
||||||
|
|
||||||
Outputs can be used in subsequent steps to comment on the pull request:
|
Outputs can be used in subsequent steps to comment on the pull request:
|
||||||
|
|
||||||
```yaml
|
|
||||||
steps:
|
|
||||||
- uses: hashicorp/setup-terraform@v1
|
|
||||||
|
|
||||||
- run: terraform init
|
|
||||||
|
|
||||||
- id: plan
|
|
||||||
run: terraform plan -no-color
|
|
||||||
|
|
||||||
- uses: actions/github-script@0.9.0
|
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
env:
|
|
||||||
STDOUT: "```terraform\n${{ steps.plan.outputs.stdout }}```"
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
script: |
|
|
||||||
const output = `<details><summary>tf plan:</summary>\n\n${process.env.STDOUT}\n\n</details>`;
|
|
||||||
|
|
||||||
github.issues.createComment({
|
|
||||||
issue_number: context.issue.number,
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
body: output
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
||||||
Outputs can be used in subsequent steps to comment on the pull request
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue