Skip to content

Commit dd87972

Browse files
Assume AWS role for SOPS Slack Webhook.
1 parent ba4c30f commit dd87972

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/release-and-deploy-bfd.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,12 @@ jobs:
4646
with:
4747
node-version: 24.x
4848

49-
- name: Configure AWS credentials
50-
uses: aws-actions/configure-aws-credentials@v6
49+
- name: Assume role to AWS
50+
uses: aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 # v6.1.0
51+
env:
52+
AWS_REGION: ${{ github.event.inputs.aws-region || 'us-east-1' }}
5153
with:
52-
role-to-assume: ${{ steps.get-role-arn.outputs.role-arn }}
54+
role-to-assume: arn:aws:iam::${{ github.ref_name =='main' && secrets.PROD_ACCOUNT || secrets.NON_PROD_ACCOUNT }}:role/delegatedadmin/developer/${{ github.ref_name =='main' && 'cdap-prod' || 'cdap-test' }}-github-actions
5355
role-session-name: get-sops-slack-webhook-${{ github.run_id }}-${{ github.run_attempt }}
5456
aws-region: ${{ env.AWS_REGION }}
5557

0 commit comments

Comments
 (0)