Skip to content

Commit 47b2da9

Browse files
authored
Merge pull request #29 from urcomputeringpal/add-outputs
Add outputs
2 parents fba1b3a + 39afad1 commit 47b2da9

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed

.github/workflows/test.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,15 @@ jobs:
2121
steps:
2222
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
2323
- uses: ./
24+
id: demo
2425
with:
2526
label-prefix: demo
2627
pulumi-output: |
2728
1 to update
29+
- name: test-outputs
30+
env:
31+
JSON: ${{ toJson(steps.demo.outputs) }}
32+
UPDATE: ${{ steps.demo.outputs.demo-updates }}
33+
run: |
34+
echo $JSON
35+
[ "$UPDATE" == "true" ]

dist/index.js

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

dist/index.js.map

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

src/main.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ async function run(): Promise<void> {
2525
const labels = await computeLabels(pulumiOutput, labelPrefix)
2626
await ensureLabels(labelPrefix, context, octokit)
2727
await labelPR(labels, prNumber, context, octokit)
28+
for (const label of labels.add) {
29+
core.setOutput(label.replace(/ /, '-'), 'true')
30+
}
2831
} catch (error) {
2932
if (error instanceof Error) core.setFailed(error.message)
3033
}

0 commit comments

Comments
 (0)