diff --git a/.github/workflows/verify-deploy.yml b/.github/workflows/verify-deploy.yml index d52b6a5e7..6dd9e6290 100644 --- a/.github/workflows/verify-deploy.yml +++ b/.github/workflows/verify-deploy.yml @@ -33,11 +33,13 @@ jobs: uses: actions/checkout@v4 - name: Assume role in AB2D account for this environment - uses: aws-actions/configure-aws-credentials@v3 + uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 + env: + ACCOUNT: ${{ inputs.environment == '' && 'test' || inputs.environment }} 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 - + role-to-assume: arn:aws:iam::${{ secrets[format('{0}_ACCOUNT_ID', env.ACCOUNT)] }}:role/delegatedadmin/developer/ab2d-${{ env.ACCOUNT }}-github-actions + - name: Set environment-specific variables run: | ENVIRONMENT="${{ inputs.environment || 'test' }}"