fix: update output handling for reusable workflows (#1521)

* fix: map job output for reusable workflows

This fixes the job outputs for reusable workflows. There is
a required indirection. Before this we took the outputs from
all jobs which is not what users express with the workflow
outputs.

* fix: remove double evaluation

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Markus Wolf
2023-02-23 23:34:47 +01:00
committed by GitHub
parent 53095d76f4
commit 89cb558558
5 changed files with 35 additions and 4 deletions

View File

@@ -27,7 +27,7 @@ on:
outputs:
output:
description: "A workflow output"
value: ${{ jobs.reusable_workflow_job.outputs.output }}
value: ${{ jobs.reusable_workflow_job.outputs.job-output }}
jobs:
reusable_workflow_job:
@@ -79,4 +79,4 @@ jobs:
echo "value=${{ inputs.string_required }}" >> $GITHUB_OUTPUT
outputs:
output: ${{ steps.output_test.outputs.value }}
job-output: ${{ steps.output_test.outputs.value }}