@@ -27,40 +27,19 @@ defaults:
2727 shell : bash
2828
2929jobs :
30- check_skip :
31- name : Check skip-fleet-models-ci label
32- runs-on : ubuntu-latest
33-
34- outputs :
35- skip : ${{ steps.check_skip.outputs.skip }}
36-
37- steps :
38- - name : Check skip-fleet-models-ci label
39- id : check_skip
40- shell : bash
41- run : |
42- if [[ "${{ github.event_name }}" == "pull_request" ]]; then
43- labels='${{ toJson(github.event.pull_request.labels.*.name) }}'
44- echo "PR labels: $labels"
45-
46- if echo "$labels" | grep -q "skip-fleet-models-ci"; then
47- echo "skip=true" >> "$GITHUB_OUTPUT"
48- else
49- echo "skip=false" >> "$GITHUB_OUTPUT"
50- fi
51- else
52- echo "skip=false" >> "$GITHUB_OUTPUT"
53- fi
54-
55- - name : Skip CI but mark success
56- if : steps.check_skip.outputs.skip == 'true'
57- run : |
58- echo "skip-fleet-models-ci label found"
59- echo "Downstream GPU jobs will be skipped"
30+ check-bypass :
31+ name : Check bypass
32+ if : ${{ inputs.can-skip != 'true' }}
33+ uses : ./.github/workflows/check-bypass.yml
34+ with :
35+ workflow-name : ' fleet-model-test'
36+ secrets :
37+ github-token : ${{ secrets.GITHUB_TOKEN }}
38+
6039
6140 check_documents_type :
62- needs : check_skip
63- if : ${{ needs.check_skip .outputs.skip == 'false' }}
41+ needs : check-bypass
42+ if : ${{ needs.check-bypass .outputs.can- skip == 'false' }}
6443 name : check documents type for pull request
6544 runs-on : ubuntu-latest
6645 env :
10382 echo "is_md_only: $(cat $GITHUB_OUTPUT | grep is_md_only || echo '未找到')"
10483
10584 integration-test-H20-single-card :
106- needs : [check_documents_type, check_skip ]
107- if : ${{ needs.check_documents_type.outputs.is_md_only == 'false' && needs.check_skip .outputs.skip == 'false' }}
85+ needs : [check_documents_type, check-bypass ]
86+ if : ${{ needs.check_documents_type.outputs.is_md_only == 'false' && needs.check-bypass .outputs.can- skip == 'false' }}
10887 name : Integration test (H20, single card)
10988 runs-on :
11089 group : Fleet-H-single-card
@@ -266,8 +245,8 @@ jobs:
266245
267246
268247 integration-test-H20-multi-card :
269- needs : [check_documents_type, check_skip ]
270- if : ${{ needs.check_documents_type.outputs.is_md_only == 'false' && needs.check_skip .outputs.skip == 'false' }}
248+ needs : [check_documents_type, check-bypass ]
249+ if : ${{ needs.check_documents_type.outputs.is_md_only == 'false' && needs.check-bypass .outputs.can- skip == 'false' }}
271250 name : Integration test (H20, multi-card)
272251 runs-on :
273252 group : Fleet-H-multi-card
@@ -548,8 +527,8 @@ jobs:
548527
549528
550529 integration-test-a100 :
551- needs : [check_documents_type, check_skip ]
552- if : ${{ needs.check_documents_type.outputs.is_md_only == 'false' && needs.check_skip .outputs.skip == 'false' }}
530+ needs : [check_documents_type, check-bypass ]
531+ if : ${{ needs.check_documents_type.outputs.is_md_only == 'false' && needs.check-bypass .outputs.can- skip == 'false' }}
553532 name : Integration test (A100)
554533 runs-on :
555534 group : Distribute
0 commit comments