Skip to content

Commit efbde01

Browse files
authored
Add Outputs to Update Workflow (#18)
* add outputs to workflow-call * define outputs in job * set both pr base and branch name as output, use snakeCase * Update description for baseBranch output * Rename output url to more explicit prUrl
1 parent 539bba5 commit efbde01

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/updater.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,22 @@ on:
6767
secrets:
6868
api_token:
6969
required: true
70+
outputs:
71+
prUrl:
72+
description: "The created/updated PRs url."
73+
value: ${{ jobs.update.outputs.prUrl }}
74+
baseBranch:
75+
description: "The base branch name."
76+
value: ${{ jobs.update.outputs.baseBranch }}
77+
prBranch:
78+
description: "The created/updated pr branch name."
79+
value: ${{ jobs.update.outputs.prBranch }}
80+
originalTag:
81+
description: "The original tag from which the dependency was updated from."
82+
value: ${{ jobs.update.outputs.originalTag }}
83+
latestTag:
84+
description: "The latest tag to which the dependency was updated to."
85+
value: ${{ jobs.update.outputs.latestTag }}
7086

7187
jobs:
7288
cancel-previous-run:
@@ -96,6 +112,13 @@ jobs:
96112
# with notifications about pushes to existing PRs. This way there is actually no push if not needed.
97113
update:
98114
runs-on: ${{ inputs.runs-on }}
115+
# Map the job outputs to step outputs
116+
outputs:
117+
prUrl: ${{ steps.pr.outputs.url }}
118+
baseBranch: ${{ steps.root.outputs.baseBranch }}
119+
prBranch: ${{ steps.root.outputs.prBranch }}
120+
originalTag: ${{ steps.target.outputs.originalTag }}
121+
latestTag: ${{ steps.target.outputs.latestTag }}
99122
timeout-minutes: 30
100123
defaults:
101124
run:

0 commit comments

Comments
 (0)