Skip to content

Commit

Permalink
add on PR for testing and assume credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
oluwolenpbc authored and oluwolenpbc committed Oct 16, 2024
1 parent 700e36a commit df7d1d9
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/verify-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Verify deployment

on:
pull_request:
workflow_call:
inputs:
environment:
Expand All @@ -27,14 +28,21 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v3

- name: Assume role in AB2D account for this environment
uses: aws-actions/configure-aws-credentials@v3
with:
aws-region: ${{ vars.AWS_REGION }}
role-to-assume: arn:aws:iam::${{ secrets[format('{0}_ACCOUNT_ID', inputs.environment)] }}:role/delegatedadmin/developer/ab2d-${{ inputs.environment }}-github-actions


- name: Set script file based on environment
run: |
if [[ "${{ github.event.inputs.environment }}" == "sbx-sandbox" ]]; then
script="verify-deployment-ab2d-sbx-sandbox.sh"
script="./scripts/verify-deployment-ab2d-sbx-sandbox.sh"
elif [[ "${{ github.event.inputs.environment }}" == "east-prod" ]]; then
script="verify-deployment-ab2d-east-prod.sh"
script="./scripts/verify-deployment-ab2d-east-prod.sh"
elif [[ "${{ github.event.inputs.environment }}" == "east-impl" ]]; then
script="verify-deployment-ab2d-east-impl.sh"
script="./scripts/verify-deployment-ab2d-east-impl.sh"
else
echo "Invalid environment selected."
exit 1
Expand Down

0 comments on commit df7d1d9

Please sign in to comment.