34
34
types :
35
35
- online-pkgs-static-building-trigger-event
36
36
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"
37
46
38
47
permissions :
39
48
contents : read # to fetch code (actions/checkout)
@@ -101,7 +110,6 @@ jobs:
101
110
runs-on : ubuntu-22.04
102
111
needs : generate-matrix
103
112
name : ${{ matrix.legs.RTT_BSP }}
104
- if : github.repository_owner == 'RT-Thread'
105
113
strategy :
106
114
fail-fast : false
107
115
matrix : ${{ fromJson(needs.generate-matrix.outputs.filtered_matrix) }}
@@ -233,24 +241,32 @@ jobs:
233
241
python tools/ci/bsp_buildings.py
234
242
235
243
- name : Upload output as artifact
236
- if : ${{ success() }}
244
+ if : ${{ success() && github.event.inputs.output_contral == 'attachconfig' }}
237
245
uses : actions/upload-artifact@main
238
246
with :
239
247
name : ${{ matrix.legs.RTT_BSP }}
240
248
if-no-files-found : ignore
241
249
path : output/
242
250
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
+
243
259
- name : Post failure comment
244
260
if : failure()
245
261
run : |
246
262
curl -X POST -H "Authorization: token ${{ secrets.RTTHREAD_GITHUB_TOKEN }}" \
247
263
-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."}' \
248
264
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments"
249
265
# 整合所有的output为一个文件夹
250
- collect-artifacts :
266
+ collect-artifacts1 :
251
267
needs : build
252
268
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'}}
254
270
steps :
255
271
# 这里会下载所有产物
256
272
- name : Download all artifacts
@@ -264,4 +280,21 @@ jobs:
264
280
uses : actions/upload-artifact@main
265
281
with :
266
282
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