Skip to content

Commit 3399d8d

Browse files
authored
feat: Add empty as an output to indicate if the calculated plan has any changes or not (#47)
1 parent 64fdf7f commit 3399d8d

File tree

4 files changed

+5
-0
lines changed

4 files changed

+5
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,4 @@ summary.
114114
This action provides the following output:
115115

116116
- `markdown`: The raw markdown output of the terraform plan
117+
- `empty`: Whether the terraform plan contains any change or not

action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ inputs:
3434
outputs:
3535
markdown:
3636
description: The raw markdown output of the terraform plan
37+
empty:
38+
description: Whether the terraform plan contains any change or not
3739
runs:
3840
using: node20
3941
main: dist/index.js

dist/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ async function run() {
2929
const planMarkdown = await core.group('Render plan diff markdown', async () => {
3030
const markdown = renderMarkdown({ plan, header: inputs.header })
3131
core.setOutput('markdown', markdown)
32+
core.setOutput('empty', planIsEmpty(plan))
3233
return markdown
3334
})
3435

0 commit comments

Comments
 (0)