Skip to content

Commit

Permalink
Merge pull request #29 from urcomputeringpal/add-outputs
Browse files Browse the repository at this point in the history
Add outputs
  • Loading branch information
jnewland committed Sep 20, 2023
2 parents fba1b3a + 39afad1 commit 47b2da9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,15 @@ jobs:
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- uses: ./
id: demo
with:
label-prefix: demo
pulumi-output: |
1 to update
- name: test-outputs
env:
JSON: ${{ toJson(steps.demo.outputs) }}
UPDATE: ${{ steps.demo.outputs.demo-updates }}
run: |
echo $JSON
[ "$UPDATE" == "true" ]
3 changes: 3 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ async function run(): Promise<void> {
const labels = await computeLabels(pulumiOutput, labelPrefix)
await ensureLabels(labelPrefix, context, octokit)
await labelPR(labels, prNumber, context, octokit)
for (const label of labels.add) {
core.setOutput(label.replace(/ /, '-'), 'true')
}
} catch (error) {
if (error instanceof Error) core.setFailed(error.message)
}
Expand Down

0 comments on commit 47b2da9

Please sign in to comment.