Skip to content

Commit

Permalink
fail assuming DSO role
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-harvey committed Apr 25, 2024
1 parent c93cbc0 commit 6f328a6
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,11 @@ runs:
steps.run-command.outputs.start-time != '' &&
inputs.oidc-role != ''
continue-on-error: true # allow the job to succeed when this and subsequent steps fail. that way we don't block the calling workflow by failing this action when the command succceeds but one of our steps fails
# uses: aws-actions/configure-aws-credentials@v4
# with:
# role-to-assume: ${{ inputs.oidc-role}}
# role-session-name: ${{ inputs.oidc-role-session-name }}
# aws-region: ${{ inputs.aws-region }}
shell: bash
run: exit 1
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ inputs.oidc-role}}
role-session-name: ${{ inputs.oidc-role-session-name }}
aws-region: ${{ inputs.aws-region }}

- name: Warn on failure
if: ${{ !cancelled() && steps.get-oidc-creds.outcome == 'failure' }}
Expand All @@ -71,13 +69,15 @@ runs:
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:
role-to-assume: arn:aws:iam::${{ inputs.aws-account-id}}:role/delegatedadmin/developer/ct-cmcs-mac-fc-dso-metrics-report-events-role
role-session-name: ${{ inputs.oidc-role-session-name }}
aws-region: ${{ inputs.aws-region }}
role-chaining: true
role-skip-session-tagging: true
# uses: aws-actions/configure-aws-credentials@v4
# with:
# role-to-assume: arn:aws:iam::${{ inputs.aws-account-id}}:role/delegatedadmin/developer/ct-cmcs-mac-fc-dso-metrics-report-events-role
# role-session-name: ${{ inputs.oidc-role-session-name }}
# aws-region: ${{ inputs.aws-region }}
# role-chaining: true
# role-skip-session-tagging: true
shell: bash
run: exit 1

- name: Warn on failure
if: ${{ !cancelled() && steps.assume-dso-role.outcome == 'failure' }}
Expand Down

0 comments on commit 6f328a6

Please sign in to comment.