feat: Allow audience to be explicitly specified

The default audience for the GitHub OIDC uses sts.amazonaws.com, but there are
situations when it would be desirable to allow different audience names to be
used instead. Allow this to be specified as an argument to the action.
This commit is contained in:
Alex Blewitt
2021-10-09 09:13:53 +01:00
parent f350a92ff6
commit 2f8dfd0ed4
3 changed files with 9 additions and 1 deletions
+2
View File
@@ -98,6 +98,7 @@ The following table describes which identity is used based on which values are s
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
audience: sts.amazonaws.com
aws-region: us-east-2
role-to-assume: arn:aws:iam::123456789100:role/my-github-actions-role
role-session-name: MySessionName
@@ -108,6 +109,7 @@ In this example, the Action will load the OIDC token from the GitHub-provided en
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
audience: sts.amazonaws.com
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2