-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1.07 KB
/
github-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: GitHub Outputs
on:
workflow_call:
inputs:
build-target:
required: true
type: string
outputs:
workflow_output1:
description: "The first job output"
value: ${{ jobs.job1.outputs.output1 }}
workflow_output2:
description: "The second job output"
value: ${{ jobs.job1.outputs.output2 }}
jobs:
job1:
runs-on: ${{ inputs.build-target }}
# Map a step output to a job output
outputs:
output1: ${{ steps.step1.outputs.test }}
output2: ${{ steps.step2.outputs.test }}
steps:
- name: Script Version
run: |
echo "::group::Script Versioning"
$scriptVersion = "1.0.1"
echo "Build Script Version: $scriptVersion"
echo "::endgroup::"
shell: pwsh
- id: step1
run: echo "test=hello" >> $env:GITHUB_OUTPUT
- id: step2
run: echo "test=world" >> $env:GITHUB_OUTPUT
job2:
runs-on: ubuntu-latest
needs: job1
steps:
- run: echo ${{needs.job1.outputs.output1}} ${{needs.job1.outputs.output2}}