-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (51 loc) · 1.3 KB
/
grouped.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Grouped Workflow
on: [push]
jobs:
job0:
runs-on: ubuntu-latest
steps:
- name: 执行作业0
run: echo "Job 0 is running"
job1:
runs-on: ubuntu-latest
needs: job0
steps:
- name: 执行作业1
run: echo "Job 1 is running"
job2:
runs-on: windows-latest
needs: group2_job1
steps:
- name: 执行作业2
run: echo "Job 2 is running"
group1_job1:
runs-on: ubuntu-latest
steps:
- name: Step 1 in Group 1 Job 1
run: echo "Step 1 in Group 1 Job 1"
group1_job2:
runs-on: ubuntu-latest
needs: [group1_job1, job3,job2,job1] # Group 1 Job 2 依赖于 Group 1 Job 1
steps:
- name: Step 1 in Group 1 Job 2
run: echo "Step 1 in Group 1 Job 2"
- name: Step 2 in Group 1 Job 2
run: echo "Step 2 in Group 1 Job 2"
group2_job1:
runs-on: ubuntu-latest
needs: job0
steps:
- name: Step 1 in Group 2 Job 1
run: echo "Step 1 in Group 2 Job 1"
group2_job2:
runs-on: ubuntu-latest
needs: group2_job1 # Group 2 Job 2 依赖于 Group 2 Job 1
steps:
- name: Step 1 in Group 2 Job 2
run: echo "Step 1 in Group 2 Job 2"
job3:
runs-on: macOS-latest
needs: job0
steps:
- name: 执行作业3
run: echo "Job 3 is running"