File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 steps :
1818 - uses : actions/checkout@v4
1919 - uses : ./.github/actions/context
20+ call_worker :
21+ uses : ./.github/workflows/worker.yml
22+ with :
23+ boolean : false
24+ number : 1
25+ string : ' hello'
Original file line number Diff line number Diff line change 1+ name : Worker
2+
3+ on :
4+ workflow_call :
5+ inputs :
6+ boolean :
7+ description : ' A boolean input'
8+ default : true
9+ required : true
10+ type : boolean
11+ number :
12+ description : ' A number input'
13+ default : 0
14+ required : true
15+ type : number
16+ string :
17+ description : ' A string input'
18+ default : ' foo'
19+ required : true
20+ type : string
21+ optional :
22+ description : ' An optional input'
23+ default : ' fallback'
24+ required : false
25+ type : string
26+ outputs :
27+ workflow_output1 :
28+ description : " The first job output"
29+ value : ${{ jobs.output.outputs.one }}
30+ workflow_output2 :
31+ description : " The second job output"
32+ value : ${{ jobs.output.outputs.two }}
33+
34+ concurrency :
35+ group : ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
36+ cancel-in-progress : true
37+
38+ jobs :
39+ context :
40+ runs-on : ubuntu-latest
41+ steps :
42+ - uses : actions/checkout@v4
43+ - uses : ./.github/actions/context
44+
45+ output :
46+ runs-on : ubuntu-latest
47+
48+ outputs :
49+ one : ${{ steps.output.outputs.big }}
50+ two : ${{ steps.test.outcome }}
51+ steps :
52+ - uses : actions/checkout@v4
53+ - id : output
54+ shell : bash
55+ run : |
56+ echo "big=${{ github.event.inputs.number > 10 }}" >> $GITHUB_OUTPUT
57+ - id : test
58+ shell : bash
59+ run : |
60+ if [[ "${{ github.event.inputs.boolean }}" == 'true' ]]; then
61+ exit 1
62+ fi
63+
64+
You can’t perform that action at this time.
0 commit comments