Skip to content

Commit

Permalink
feat: Config
Browse files Browse the repository at this point in the history
  • Loading branch information
dango2887 committed Aug 25, 2023
1 parent 3d95117 commit 07936b2
Showing 1 changed file with 40 additions and 35 deletions.
75 changes: 40 additions & 35 deletions .github/workflows/grouped.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,56 +6,61 @@ jobs:
job0:
runs-on: ubuntu-latest
steps:
- name: 执行作业0
run: echo "Job 0 is running"
- name: Job 0
run: |
echo "job0"
job1:
job00:
runs-on: ubuntu-latest
needs: job0
steps:
- name: 执行作业1
run: echo "Job 1 is running"
- name: Job 00
run: |
echo "job00"
job2:
runs-on: windows-latest
needs: group2_job1
job1:
runs-on: ubuntu-latest
needs: [job0]
steps:
- name: 执行作业2
run: echo "Job 2 is running"

- name: Job 1
run: |
echo "job1"
group1_job1:
job1_2:
runs-on: ubuntu-latest
needs: [job1]
steps:
- name: Step 1 in Group 1 Job 1
run: echo "Step 1 in Group 1 Job 1"
- name: Job 1_2
run: |
echo "job1_2"
group1_job2:
job1_3:
runs-on: ubuntu-latest
needs: [group1_job1, job3,job2,job1] # Group 1 Job 2 依赖于 Group 1 Job 1
needs: [job1_2, job2]
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"
- name: Job 1_3
run: |
echo "job1_3"
group2_job1:
job2:
runs-on: ubuntu-latest
needs: job0
needs: [job0]
steps:
- name: Step 1 in Group 2 Job 1
run: echo "Step 1 in Group 2 Job 1"
- name: Job 2
run: |
echo "job2"
group2_job2:
job3:
runs-on: ubuntu-latest
needs: group2_job1 # Group 2 Job 2 依赖于 Group 2 Job 1
needs: [job0]
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
- name: Job 3
run: |
echo "job3"
job4:
runs-on: ubuntu-latest
needs: [job1_3, job3, job2]
steps:
- name: 执行作业3
run: echo "Job 3 is running"
- name: Job 4
run: |
echo "job4"

0 comments on commit 07936b2

Please sign in to comment.