From 01cc1edfe606e3f2f89aa19f46d568d9dea1bf8f Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 20 Dec 2023 01:58:51 +0100 Subject: [PATCH] test --- .../workflows/reusable-build-test-release.yml | 39 ++++++++++++------- .github/workflows/reusable-lightweight.yml | 8 ++++ 2 files changed, 34 insertions(+), 13 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 1cf0983ef..0053fa85d 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -556,7 +556,12 @@ jobs: appinspect-cli: name: AppInspect CLI ${{ matrix.tags }} runs-on: ubuntu-latest - needs: build + # inputs to `dynamic-uses` step + env: + matrix_tags: ${{ matrix.tags }} + needs: + - build + - get-called-ref if: ${{ !cancelled() && needs.build.result == 'success' }} strategy: fail-fast: false @@ -571,15 +576,22 @@ jobs: - "splunk_appinspect" - "manual" steps: - - name: Run appinspect CLI - uses: ./.github/actions/appinspect-cli + - uses: jenseng/dynamic-uses@v1 with: - matrix_tags: ${{ matrix.tags }} + uses: splunk/addonfactory-workflow-addon-release/.github/actions/appinspect-cli@${{ needs.get-called-ref.outputs.ref }} + # inputs need to provided as a valid JSON string + with: ${{ toJSON(env) }} appinspect-api: name: AppInspect API ${{ matrix.tags }} runs-on: ubuntu-latest - needs: build + env: + matrix_tags: ${{ matrix.tags }} + SPL_COM_USER: ${{ secrets.SPL_COM_USER }} + SPL_COM_PASSWORD: ${{ secrets.SPL_COM_PASSWORD }} + needs: + - build + - get-called-ref if: | !cancelled() && needs.build.result == 'success' && @@ -592,12 +604,11 @@ jobs: - "self-service" - "" steps: - - name: Run appinspect API - uses: ./.github/actions/appinspect-api + - uses: jenseng/dynamic-uses@v1 with: - matrix_tags: ${{ matrix.tags }} - SPL_COM_USER: ${{ secrets.SPL_COM_USER }} - SPL_COM_PASSWORD: ${{ secrets.SPL_COM_PASSWORD }} + uses: splunk/addonfactory-workflow-addon-release/.github/actions/appinspect-api@${{ needs.get-called-ref.outputs.ref }} + # inputs need to provided as a valid JSON string + with: ${{ toJSON(env) }} artifact-registry: name: Artifact registry @@ -605,15 +616,17 @@ jobs: needs: - virustotal - meta + - get-called-ref if: ${{ !cancelled() && needs.virustotal.result == 'success' && needs.meta.result == 'success' }} permissions: contents: read packages: write steps: - - name: Run artifact registry - uses: ./.github/actions/artifact-registry + - uses: jenseng/dynamic-uses@v1 with: - sc4s: ${{ needs.meta.outputs.sc4s }} + uses: splunk/addonfactory-workflow-addon-release/.github/actions/artifact-registry@${{ needs.get-called-ref.outputs.ref }} + # inputs need to provided as a valid JSON string + with: ${{ toJSON(env) }} setup: needs: diff --git a/.github/workflows/reusable-lightweight.yml b/.github/workflows/reusable-lightweight.yml index be721d656..e532dbac9 100644 --- a/.github/workflows/reusable-lightweight.yml +++ b/.github/workflows/reusable-lightweight.yml @@ -296,6 +296,14 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} ucc_modinput_functional: ${{ needs.test-inventory.outputs.ucc_modinput_functional}} modinput_functional: ${{ needs.test-inventory.outputs.modinput_functional}} + - name: Checkout repository + uses: jenseng/dynamic-uses@v1 + env: + repository: splunk/addonfactory-workflow-addon-release + ref: ${{ needs.get-called-ref.outputs.ref }} + with: + uses: actions/checkout@v3 + with: ${{ toJSON(env) }} virustotal: runs-on: ubuntu-latest