@@ -368,10 +368,10 @@ jobs:
368368 ucc_modinput_functional : ${{ fromJSON(steps.test-inventory.outputs.outputs).ucc_modinput_functional }}
369369 modinput_functional : ${{ fromJSON(steps.test-inventory.outputs.outputs).modinput_functional }}
370370 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 }}
375375 steps :
376376 - uses : jenseng/dynamic-uses@v1
377377 id : test-inventory
@@ -445,13 +445,22 @@ jobs:
445445 - semgrep
446446 - run-unit-tests-3_7
447447 - fossa-scan
448+ - get-called-ref
448449 if : ${{ !cancelled() && (needs.run-unit-tests-3_7.result == 'success' || needs.run-unit-tests-3_7.result == 'skipped') }}
449450 outputs :
450- buildname : ${{ steps.build.outputs.buildname }}
451+ buildname : ${{ fromJSON( steps.build.outputs.outputs) .buildname }}
451452 permissions :
452453 contents : write
453454 packages : read
454455 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) }}
455464 - name : Run build 3.7
456465 id : build
457466 uses : ./.github/actions/build
@@ -479,11 +488,20 @@ jobs:
479488 - semgrep
480489 - run-unit-tests-3_7
481490 - fossa-scan
491+ - get-called-ref
482492 if : ${{ !cancelled() && (needs.run-unit-tests-3_7.result == 'success' || needs.run-unit-tests-3_7.result == 'skipped') }}
483493 permissions :
484494 contents : write
485495 packages : read
486496 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) }}
487505 - name : Run build 3.9
488506 uses : ./.github/actions/build
489507 with :
@@ -501,20 +519,27 @@ jobs:
501519 virustotal :
502520 continue-on-error : true
503521 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
505528 if : ${{ !cancelled() && needs.build.result == 'success' }}
506529 steps :
507- - name : Run VirusTotal check
508- uses : ./.github/actions/virustotal
530+ - uses : jenseng/dynamic-uses@v1
509531 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) }}
511535
512536 run-requirements-unit-tests :
513537 name : Requirements unit tests
514538 runs-on : ubuntu-latest
515539 needs :
516540 - build
517541 - test-inventory
542+ - get-called-ref
518543 if : ${{ !cancelled() && needs.build.result == 'success' && needs.test-inventory.outputs.requirement_test == 'true' }}
519544 permissions :
520545 actions : read
@@ -524,8 +549,9 @@ jobs:
524549 statuses : read
525550 checks : write
526551 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 }}
529555
530556 appinspect-cli :
531557 name : AppInspect CLI ${{ matrix.tags }}
0 commit comments