File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : my action
2+ description : Set some variable as output
3+ inputs :
4+ my-input :
5+ description : ' Some input'
6+ required : true
7+ outputs :
8+ my-output :
9+ description : ' The output'
10+ value : ${{ steps.my-step.outputs.dependencies_hash }}
11+ runs :
12+ using : composite
13+ steps :
14+ - id : my-step
15+ name : Step to write output
16+ run : |
17+ echo ${{ inputs.my-input }}
18+ echo "my-output='output from my action.'" >> $GITHUB_OUTPUT
19+ shell : bash
Original file line number Diff line number Diff line change 1+ name : Test
2+
3+ on : [push,pull_request]
4+
5+ jobs :
6+ job1 :
7+ runs-on : ubuntu-latest
8+ outputs :
9+ my-output-from-job : ${{ steps.my-action.outputs.my-output.value }}
10+ steps :
11+ - id : my-action
12+ uses : ./.github/actions/my-action
13+ with :
14+ my-input : ' Input from job1'
15+ - name : use output from the custom action
16+ run : echo ${{ steps.my-action.outputs.my-output.value }}
17+
18+ job2 :
19+ runs-on : ubuntu-latest
20+ needs : job1
21+ steps :
22+ - run : |
23+ echo ${{ needs.job1.outputs.my-output-from-job }}
You can’t perform that action at this time.
0 commit comments