3434 types :
3535 - online-pkgs-static-building-trigger-event
3636 workflow_dispatch :
37+ inputs :
38+ output_contral :
39+ description : ' Output Contral'
40+ required : false
41+ default : ' attachconfig'
42+ type : choice
43+ options :
44+ - " attachconfig"
45+ - " versionconfig"
3746
3847permissions :
3948 contents : read # to fetch code (actions/checkout)
@@ -101,7 +110,6 @@ jobs:
101110 runs-on : ubuntu-22.04
102111 needs : generate-matrix
103112 name : ${{ matrix.legs.RTT_BSP }}
104- if : github.repository_owner == 'RT-Thread'
105113 strategy :
106114 fail-fast : false
107115 matrix : ${{ fromJson(needs.generate-matrix.outputs.filtered_matrix) }}
@@ -233,24 +241,32 @@ jobs:
233241 python tools/ci/bsp_buildings.py
234242
235243 - name : Upload output as artifact
236- if : ${{ success() }}
244+ if : ${{ success() && github.event.inputs.output_contral == 'attachconfig' }}
237245 uses : actions/upload-artifact@main
238246 with :
239247 name : ${{ matrix.legs.RTT_BSP }}
240248 if-no-files-found : ignore
241249 path : output/
242250
251+ - name : Upload output as artifact
252+ if : ${{ success() && github.event.inputs.output_contral == 'versionconfig'}}
253+ uses : actions/upload-artifact@main
254+ with :
255+ name : ${{ matrix.legs.RTT_BSP }}
256+ if-no-files-found : ignore
257+ path : version_output/
258+
243259 - name : Post failure comment
244260 if : failure()
245261 run : |
246262 curl -X POST -H "Authorization: token ${{ secrets.RTTHREAD_GITHUB_TOKEN }}" \
247263 -d '{"body":"@${{ github.actor }}, Thank you for your contribution, but there was an error with the action. Could you please help check the BSP compilation issue? Thank you."}' \
248264 "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments"
249265 # 整合所有的output为一个文件夹
250- collect-artifacts :
266+ collect-artifacts1 :
251267 needs : build
252268 runs-on : ubuntu-latest
253- if : github.event_name != 'pull_request' # 排除Pull request
269+ if : ${{ github.event_name != 'pull_request' && github.event.inputs.output_contral == 'attachconfig'}}
254270 steps :
255271 # 这里会下载所有产物
256272 - name : Download all artifacts
@@ -264,4 +280,21 @@ jobs:
264280 uses : actions/upload-artifact@main
265281 with :
266282 name : 00_all_bsp_output_${{ github.sha }}
267- path : output/
283+ path : output/
284+ collect-artifacts2 :
285+ needs : build
286+ runs-on : ubuntu-latest
287+ if : ${{github.event_name != 'pull_request' && github.event.inputs.output_contral == 'versionconfig'}}
288+ steps :
289+ - name : Download all artifacts
290+ uses : actions/download-artifact@main
291+ with :
292+ path : version_output/
293+ merge-multiple : true
294+ - run : ls -R version_output/
295+
296+ - name : Upload combined output as artifact
297+ uses : actions/upload-artifact@main
298+ with :
299+ name : 00_all_bsp_output_${{ github.sha }}
300+ path : version_output/
0 commit comments