File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,28 +2,33 @@ name: Concurrency test
22on :
33 workflow_dispatch :
44 inputs :
5- workflowgroup :
6- description : Group for the workflow
7- type : choice
8- default : none
9- options :
10- - a
11- - b
12- - none
13- jobgroup :
14- description : Group for the job
15- type : string
5+ delay :
6+ description : Job delay
7+ required : true
8+ type : number
9+ default : 60
1610
17- concurrency :
18- group : ${{ case( inputs.workflowgroup == 'none', github.run_id, inputs.workflowgroup ) }}
19- cancel-in-progress : true
11+ env :
12+ DELAY : ${{ inputs.delay }}
2013
2114jobs :
22- thejob :
23- name : The job; workflowgroup=${{ inputs.workflowgroup }} jobgroup=${{ inputs.jobgroup }}
15+ a :
16+ name : A
17+ runs-on : ubuntu-latest
18+ steps :
19+ - run : sleep "$DELAY"
20+ b :
21+ name : B
22+ needs : [ a ]
23+ runs-on : ubuntu-latest
24+ steps :
25+ - run : sleep 10
26+ c :
27+ name : C
28+ needs : [ b ]
2429 runs-on : ubuntu-latest
2530 concurrency :
26- group : ${{ inputs.jobgroup }}
31+ group : test
2732 queue : max
2833 steps :
29- - run : sleep 300
34+ - run : sleep 10
You can’t perform that action at this time.
0 commit comments