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,13 +241,21 @@ jobs:
233241 python tools/ci/bsp_buildings.py
234242
235243 - name : Upload output as artifact
236- if : ${{ success() }}
244+ if : ${{ success() && github.event.inputs.bsp_tool_chain == "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.bsp_tool_chain == "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 : |
@@ -250,7 +266,7 @@ jobs:
250266 collect-artifacts :
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.bsp_tool_chain == "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-artifacts :
285+ needs : build
286+ runs-on : ubuntu-latest
287+ if : ${{github.event_name != 'pull_request' && github.event.inputs.bsp_tool_chain == "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