diff --git a/action.yml b/action.yml index fbc3c54..7ec11ad 100644 --- a/action.yml +++ b/action.yml @@ -64,7 +64,10 @@ runs: - name: Assume DSO metrics reporting role id: assume-dso-role - if: ${{ !cancelled() && steps.run-command.outputs.start-time != '' }} + if: | + !cancelled() && + steps.run-command.outputs.start-time != '' && + (inputs.oidc-role != '' && steps.get-oidc-creds.outcome == 'success') continue-on-error: true uses: aws-actions/configure-aws-credentials@v4 with: @@ -85,6 +88,7 @@ runs: if: | !cancelled() && steps.run-command.outputs.start-time != '' && + steps.assume-dso-role.outcome == 'success' && inputs.event-type == 'test' continue-on-error: true uses: Enterprise-CMCS/mac-fc-report-dso-event/.github/actions/report-dso-event@v0.2.0 @@ -111,6 +115,7 @@ runs: if: | !cancelled() && steps.run-command.outputs.start-time != '' && + steps.assume-dso-role.outcome == 'success' && inputs.event-type == 'deploy' continue-on-error: true uses: Enterprise-CMCS/mac-fc-report-dso-event/.github/actions/report-dso-event@v0.2.0 diff --git a/build/index.js b/build/index.js index 663ba35..c52cdd8 100644 --- a/build/index.js +++ b/build/index.js @@ -32239,9 +32239,9 @@ function main() { process.exit(1); } let returns; - const command = (0, os_1.type)() === windowsType ? `${releaseName}` : `./${releaseName}`; + const command = (0, os_1.type)() === windowsType ? `${releaseName} args` : `./${releaseName} args`; try { - returns = (0, child_process_1.spawnSync)(command, [args], { shell: true }); + returns = (0, child_process_1.spawnSync)(command, { shell: true }); } catch (error) { console.error(`Error spawning child process: ${error}`); diff --git a/src/index.ts b/src/index.ts index 25ce6be..5cf0d5a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -104,9 +104,9 @@ async function main() { let returns; const command = - type() === windowsType ? `${releaseName}` : `./${releaseName}`; + type() === windowsType ? `${releaseName} args` : `./${releaseName} args`; try { - returns = spawnSync(command, [args], { shell: true }); + returns = spawnSync(command, { shell: true }); } catch (error) { console.error(`Error spawning child process: ${error}`); process.exit(1);