Initial test of Github workflow AWS OIDC integration #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Connect to AWS role | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
- feature/* | ||
env: | ||
AWS_REGION: $AWS_REGION | ||
permissions: | ||
id-token: write # This is required for requesting the JWT | ||
content: read # This is required for actions/checkout | ||
jobs: | ||
AssumeRoleAndCallIdentity: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone the Git repository | ||
uses: actions/checkout@v3 | ||
- name: Configure AWS credentials | ||
uses: aws-actions/[email protected] | ||
with: | ||
role-to-assume: $AWS_ASSUME_ROLE_ARN | ||
role-session-name: github-aws-oidc | ||
aws-region: ${{ env.AWS_REGION }} | ||
# TODO: simple API call for now; replace with Terraform plan/apply | ||
- name: Sts GetCallerIdentity | ||
run: | | ||
aws sts get-caller-identity |