@@ -368,10 +368,10 @@ jobs:
368
368
ucc_modinput_functional : ${{ fromJSON(steps.test-inventory.outputs.outputs).ucc_modinput_functional }}
369
369
modinput_functional : ${{ fromJSON(steps.test-inventory.outputs.outputs).modinput_functional }}
370
370
requirement_test : ${{ fromJSON(steps.test-inventory.outputs.outputs).requirement_test }}
371
- knowledge : ${{ fromJSON(steps.test-inventory.outputs).knowledge }}
372
- ui : ${{ fromJSON(steps.test-inventory.outputs).ui }}
373
- scripted_inputs : ${{ fromJSON(steps.test-inventory.outputs).scripted_inputs }}
374
- escu : ${{ fromJSON(steps.test-inventory.outputs).escu }}
371
+ knowledge : ${{ fromJSON(steps.test-inventory.outputs.outputs ).knowledge }}
372
+ ui : ${{ fromJSON(steps.test-inventory.outputs.outputs ).ui }}
373
+ scripted_inputs : ${{ fromJSON(steps.test-inventory.outputs.outputs ).scripted_inputs }}
374
+ escu : ${{ fromJSON(steps.test-inventory.outputs.outputs ).escu }}
375
375
steps :
376
376
- uses : jenseng/dynamic-uses@v1
377
377
id : test-inventory
@@ -445,13 +445,22 @@ jobs:
445
445
- semgrep
446
446
- run-unit-tests-3_7
447
447
- fossa-scan
448
+ - get-called-ref
448
449
if : ${{ !cancelled() && (needs.run-unit-tests-3_7.result == 'success' || needs.run-unit-tests-3_7.result == 'skipped') }}
449
450
outputs :
450
- buildname : ${{ steps.build.outputs.buildname }}
451
+ buildname : ${{ fromJSON( steps.build.outputs.outputs) .buildname }}
451
452
permissions :
452
453
contents : write
453
454
packages : read
454
455
steps :
456
+ - name : Checkout repository
457
+ uses : jenseng/dynamic-uses@v1
458
+ env :
459
+ repository : splunk/addonfactory-workflow-addon-release
460
+ ref : ${{ needs.get-called-ref.outputs.ref }}
461
+ with :
462
+ uses : actions/checkout@v3
463
+ with : ${{ toJSON(env) }}
455
464
- name : Run build 3.7
456
465
id : build
457
466
uses : ./.github/actions/build
@@ -479,11 +488,20 @@ jobs:
479
488
- semgrep
480
489
- run-unit-tests-3_7
481
490
- fossa-scan
491
+ - get-called-ref
482
492
if : ${{ !cancelled() && (needs.run-unit-tests-3_7.result == 'success' || needs.run-unit-tests-3_7.result == 'skipped') }}
483
493
permissions :
484
494
contents : write
485
495
packages : read
486
496
steps :
497
+ - name : Checkout repository
498
+ uses : jenseng/dynamic-uses@v1
499
+ env :
500
+ repository : splunk/addonfactory-workflow-addon-release
501
+ ref : ${{ needs.get-called-ref.outputs.ref }}
502
+ with :
503
+ uses : actions/checkout@v3
504
+ with : ${{ toJSON(env) }}
487
505
- name : Run build 3.9
488
506
uses : ./.github/actions/build
489
507
with :
@@ -501,20 +519,27 @@ jobs:
501
519
virustotal :
502
520
continue-on-error : true
503
521
runs-on : ubuntu-latest
504
- needs : build
522
+ # inputs to `dynamic-uses` step
523
+ env :
524
+ VT_API_KEY : ${{ secrets.VT_API_KEY }}
525
+ needs :
526
+ - build
527
+ - get-called-ref
505
528
if : ${{ !cancelled() && needs.build.result == 'success' }}
506
529
steps :
507
- - name : Run VirusTotal check
508
- uses : ./.github/actions/virustotal
530
+ - uses : jenseng/dynamic-uses@v1
509
531
with :
510
- VT_API_KEY : ${{ secrets.VT_API_KEY }}
532
+ uses : splunk/addonfactory-workflow-addon-release/.github/actions/virustotal@${{ needs.get-called-ref.outputs.ref }}
533
+ # inputs need to provided as a valid JSON string
534
+ with : ${{ toJSON(env) }}
511
535
512
536
run-requirements-unit-tests :
513
537
name : Requirements unit tests
514
538
runs-on : ubuntu-latest
515
539
needs :
516
540
- build
517
541
- test-inventory
542
+ - get-called-ref
518
543
if : ${{ !cancelled() && needs.build.result == 'success' && needs.test-inventory.outputs.requirement_test == 'true' }}
519
544
permissions :
520
545
actions : read
@@ -524,8 +549,9 @@ jobs:
524
549
statuses : read
525
550
checks : write
526
551
steps :
527
- - name : Run requirements unit tests
528
- uses : ./.github/actions/requirements-unit-tests
552
+ - uses : jenseng/dynamic-uses@v1
553
+ with :
554
+ uses : splunk/addonfactory-workflow-addon-release/.github/actions/requirements-unit-tests@${{ needs.get-called-ref.outputs.ref }}
529
555
530
556
appinspect-cli :
531
557
name : AppInspect CLI ${{ matrix.tags }}
0 commit comments