Skip to content

fix(docs): readme samples versioning #1349

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
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
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ for more information.
You can skip this session tagging by providing
`role-skip-session-tagging` as true in the action's inputs:
```yaml
uses: aws-actions/configure-aws-credentials@v4
uses: aws-actions/configure-aws-credentials@v4.2.1
with:
role-skip-session-tagging: true
```
Expand All @@ -185,13 +185,13 @@ An IAM policy in stringified JSON format that you want to use as an inline
session policy. Depending on preferences, the JSON could be written on a single
line like this:
```yaml
uses: aws-actions/configure-aws-credentials@v4
uses: aws-actions/configure-aws-credentials@v4.2.1
with:
inline-session-policy: '{"Version":"2012-10-17","Statement":[{"Sid":"Stmt1","Effect":"Allow","Action":"s3:List*","Resource":"*"}]}'
```
Or we can have a nicely formatted JSON as well:
```yaml
uses: aws-actions/configure-aws-credentials@v4.1.0
uses: aws-actions/configure-aws-credentials@v4.2.1
with:
inline-session-policy: >-
{
Expand All @@ -212,13 +212,13 @@ The Amazon Resource Names (ARNs) of the IAM managed policies that you want to
use as managed session policies. The policies must exist in the same account as
the role. You can pass a single managed policy like this:
```yaml
uses: aws-actions/configure-aws-credentials@v4.1.0
uses: aws-actions/configure-aws-credentials@v4.2.1
with:
managed-session-policies: arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess
```
And we can pass multiple managed policies likes this:
```yaml
uses: aws-actions/configure-aws-credentials@v4.1.0
uses: aws-actions/configure-aws-credentials@v4.2.1
with:
managed-session-policies: |
arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess
Expand Down Expand Up @@ -293,7 +293,7 @@ You can specify the audience through the `audience` input:

```yaml
- name: Configure AWS Credentials for China region audience
uses: aws-actions/configure-aws-credentials@v4.1.0
uses: aws-actions/configure-aws-credentials@v4.2.1
with:
audience: sts.amazonaws.com.cn
aws-region: us-east-3
Expand Down Expand Up @@ -428,7 +428,7 @@ You can use this action to simply configure the region and account ID in the
environment, and then use the runner's credentials for all AWS API calls made by
your Actions workflow:
```yaml
uses: aws-actions/configure-aws-credentials@v4.1.0
uses: aws-actions/configure-aws-credentials@v4.2.1
with:
aws-region: us-east-2
```
Expand All @@ -438,7 +438,7 @@ APIs called by your Actions workflow.
Or, you can use this action to assume a role, and then use the role credentials
for all AWS API calls made by your Actions workflow:
```yaml
uses: aws-actions/configure-aws-credentials@v4.1.0
uses: aws-actions/configure-aws-credentials@v4.2.1
with:
aws-region: us-east-2
role-to-assume: my-github-actions-role
Expand All @@ -460,7 +460,7 @@ variable.

Manually configured proxy:
```yaml
uses: aws-actions/configure-aws-credentials@v4.1.0
uses: aws-actions/configure-aws-credentials@v4.2.1
with:
aws-region: us-east-2
role-to-assume: my-github-actions-role
Expand All @@ -487,7 +487,7 @@ should include the AWS CLI by default.
### AssumeRoleWithWebIdentity (recommended)
```yaml
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4.1.0
uses: aws-actions/configure-aws-credentials@v4.2.1
with:
aws-region: us-east-2
role-to-assume: arn:aws:iam::123456789100:role/my-github-actions-role
Expand All @@ -501,13 +501,13 @@ environment variable and use it to assume the role
### AssumeRole with role previously assumed by action in same workflow
```yaml
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4.1.0
uses: aws-actions/configure-aws-credentials@v4.2.1
with:
aws-region: us-east-2
role-to-assume: arn:aws:iam::123456789100:role/my-github-actions-role
role-session-name: MySessionName
- name: Configure other AWS Credentials
uses: aws-actions/configure-aws-credentials@v4.1.0
uses: aws-actions/configure-aws-credentials@v4.2.1
with:
aws-region: us-east-2
role-to-assume: arn:aws:iam::987654321000:role/my-second-role
Expand All @@ -522,7 +522,7 @@ role, `arn:aws:iam::987654321000:role/my-second-role`.
### AssumeRole with static IAM credentials in repository secrets
```yaml
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4.1.0
uses: aws-actions/configure-aws-credentials@v4.2.1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand All @@ -541,7 +541,7 @@ name, like `role-to-assume: my-github-actions-role`.
```yaml
- name: Configure AWS Credentials 1
id: creds
uses: aws-actions/configure-aws-credentials@v4.1.0
uses: aws-actions/configure-aws-credentials@v4.2.1
with:
aws-region: us-east-2
role-to-assume: arn:aws:iam::123456789100:role/my-github-actions-role
Expand All @@ -550,7 +550,7 @@ name, like `role-to-assume: my-github-actions-role`.
run: |
aws sts get-caller-identity
- name: Configure AWS Credentials 2
uses: aws-actions/configure-aws-credentials@v4.1.0
uses: aws-actions/configure-aws-credentials@v4.2.1
with:
aws-region: us-east-2
aws-access-key-id: ${{ steps.creds.outputs.aws-access-key-id }}
Expand Down