Show Environment Variable #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Show Environment Variable | |
on: | |
workflow_dispatch: | |
jobs: | |
job1: | |
runs-on: ubuntu-latest | |
# Map a step output to a job output | |
outputs: | |
output1: ${{ steps.step1.outputs.test }} | |
output2: ${{ steps.step2.outputs.test }} | |
steps: | |
- id: step1 | |
run: echo "::set-output name=test::hello" | |
- id: step2 | |
run: echo "::set-output name=test::world" | |
job2: | |
runs-on: ubuntu-latest | |
needs: job1 | |
steps: | |
- env: | |
OUTPUT1: ${{needs.job1.outputs.output1}} | |
OUTPUT2: ${{needs.job1.outputs.output2}} | |
run: echo "$OUTPUT1 $OUTPUT2" |