File tree Expand file tree Collapse file tree 1 file changed +64
-0
lines changed
Expand file tree Collapse file tree 1 file changed +64
-0
lines changed Original file line number Diff line number Diff line change 1+ name : testing-dependent-jobs
2+ run-name : Testing variables workflow. The value of skip_tests=${{ inputs.skip_tests }}
3+
4+ on :
5+ push :
6+ branches :
7+ - ' main'
8+ # tags:
9+ # # only trigger on release tags:
10+ # - 'v*.*.*'
11+ # - 'v*.*.*-*'
12+ workflow_dispatch :
13+ inputs :
14+ skip_tests :
15+ required : false
16+ type : boolean
17+ default : false
18+ description : ' Skip tests during release build'
19+
20+ jobs :
21+
22+ job-01 :
23+ runs-on : ubuntu-22.04
24+ timeout-minutes : 30
25+
26+ steps :
27+ - name : step1
28+ run : echo this is step1
29+
30+
31+ job-2-01 :
32+ name : Job-2-01 - could be skipped
33+ if : ${{ inputs.skip_tests == 'false' }}
34+ runs-on : ubuntu-22.04
35+ needs : [ job-01 ]
36+ timeout-minutes : 30
37+
38+ steps :
39+ - name : step2-01
40+ run : echo this is step2-01
41+
42+
43+ job-2-02 :
44+ name : Job-2-02 - could be skipped
45+ if : ${{ inputs.skip_tests == 'false' }}
46+ runs-on : ubuntu-22.04
47+ needs : [ job-01 ]
48+ timeout-minutes : 30
49+
50+ steps :
51+ - name : step2-02
52+ run : echo this is step2-02
53+
54+
55+ job-3-01 :
56+ name : Job-3-01 - debug outputs
57+ runs-on : ubuntu-22.04
58+ needs : [ job-2-01, job-2-02 ]
59+ if : always()
60+
61+ steps :
62+ - name : Print debug outputs
63+ run : |
64+ echo job-2-01 result: ${{ needs.job-2-01.result }} , job-2-02 result: ${{ needs.job-2-02.result }}
You can’t perform that action at this time.
0 commit comments