Skip to content

Commit

Permalink
Also set outputs of labels we would add
Browse files Browse the repository at this point in the history
  • Loading branch information
jnewland committed Sep 20, 2023
1 parent fba1b3a commit a3d6b73
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
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 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 a3d6b73

Please sign in to comment.