Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions .github/workflows/integration-test-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,24 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5
with:
role-to-assume: ${{ vars.CDK_ATMOSPHERE_OIDC_ROLE }}
role-session-name: run-tests@aws-cdk-deployment-integ
aws-region: us-east-1
- name: Assume Atmosphere Role
id: creds
run: |
# Assume role and capture the JSON output
CREDS=$(aws sts assume-role \
--role-arn ${{ vars.CDK_ATMOSPHERE_OIDC_ROLE }} \
--role-session-name run-tests@aws-cdk-deployment-integ)
# Parse the JSON output and set environment variables
AWS_ACCESS_KEY_ID=$(echo $CREDS | jq -r '.Credentials.AccessKeyId')
AWS_SECRET_ACCESS_KEY=$(echo $CREDS | jq -r '.Credentials.SecretAccessKey')
AWS_SESSION_TOKEN=$(echo $CREDS | jq -r '.Credentials.SessionToken')
echo "::add-mask::$AWS_ACCESS_KEY_ID"
echo "::add-mask::$AWS_SECRET_ACCESS_KEY"
echo "::add-mask::$AWS_SESSION_TOKEN"

echo "AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID" >> $GITHUB_ENV
echo "AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY" >> $GITHUB_ENV
echo "AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN" >> $GITHUB_ENV

- name: Setup Node.js
uses: actions/setup-node@v5
Expand Down
Loading