已合并
actions流水线切换 #2
cui_jiahao创建于 8 天前
actions流水线切换 #2
已合并
cui_jiahao创建于 8 天前
1 个文件变更+71-0
@@ -0,0 +1,71 @@
1+name: PR-pipeline_cannbot
2+ 
3+concurrency:
4+ max: 5
5+ exceed-action: QUEUE
6+ enable: true
7+ preemption:
8+ enable: true
9+ events: [mr_id]
10+ 
11+on:
12+ workflow_dispatch:
13+ pull_request_comment:
14+ types: [created]
15+ branches: [ '*' ]
16+ comments: [ '^(?:\/)?compile*' ]
17+ pr_comment:
18+ types: [ created ]
19+ keyword: '^(?:\/)?compile*'
20+ 
21+env:
22+ org_name: ${{ vars.ORG_NAME }}
23+ repo_name: ${{ atomgit.event.repository.name}}
24+ MERGE_ID: ${{ atomgit.event.pull_request.number }}
25+ TARGET_BRANCH: ${{ atomgit.base_ref }}
26+ SOURCE_BRANCH: ${{ atomgit.head_ref }}
27+ obs_path: "${{ env.org_name }}/${{ env.repo_name }}/ci/package/${{ env.MERGE_ID }}"
28+ online: ${{ vars.APPLY_LABEL }}
29+ 
30+stages:
31+ stage1:
32+ name: PreBuild
33+ jobs:
34+ JOB_image:
35+ name: Test_image
36+ steps:
37+ - name: revise_image
38+ identifier: revise_image
39+ uses: cann/.gitcode/actions/revise-img@master
40+ with:
41+ repo_name: ${{ env.repo_name }}
42+ target_branch: ${{ env.TARGET_BRANCH }}
43+ repo_url: ${{ vars.CI_PATH }}
44+ runs-on: ['self-hosted', 'arch=x64', 'spec=small']
45+ container:
46+ image: swr.cn-north-4.myhuaweicloud.com/ci_cann/ubuntu20.04.05_x86:k8s_v1.1006
47+ JOB_pre:
48+ name: Test_PreBuild
49+ uses: cann/.gitcode/.gitcode/workflows/pre_action.yml@master
50+ pre:
51+ - type: auto
52+ fail-fast: true
53+ stage2:
54+ name: CodeCheck
55+ jobs:
56+ JOB_codecheck:
57+ name: CodeCheck
58+ uses: cann/.gitcode/.gitcode/workflows/codecheck_action.yml@master
59+ with:
60+ precommit_image_version: ${{ jobs.JOB_image.outputs.precommit }}
61+ codecheck_image_version: ${{ jobs.JOB_image.outputs.codecheck }}
62+ pre:
63+ - type: auto
64+ fail-fast: false
65+
66+ 
67+post:
68+ jobs:
69+ job_post:
70+ name: Test_post
71+ uses: cann/.gitcode/.gitcode/workflows/post_action.yml@master