-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (41 loc) · 1.23 KB
/
test-aws-auth.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: test-aws-auth
on:
merge_group: ~
workflow_dispatch: ~
pull_request:
paths:
- 'aws-auth/**'
- '.github/workflows/test-aws-auth.yml'
push:
branches:
- main
paths:
- 'aws-auth/**'
- '.github/workflows/test-aws-auth.yml'
permissions:
contents: read
id-token: write
jobs:
create-credentials:
outputs:
aws-access-key-id: ${{ steps.auth.outputs.aws-access-key-id }}
aws-secret-access-key: ${{ steps.auth.outputs.aws-secret-access-key }}
aws-session-token: ${{ steps.auth.outputs.aws-session-token }}
role-arn: ${{ steps.auth.outputs.role-arn }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./aws/auth
id: auth
- run: aws sts get-caller-identity
test:
needs: create-credentials
runs-on: ubuntu-latest
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
role-to-assume: ${{ needs.create-credentials.outputs.role-arn }}
aws-access-key-id: ${{ needs.create-credentials.outputs.aws-access-key-id }}
aws-secret-access-key: ${{ needs.create-credentials.outputs.aws-secret-access-key }}
- run: aws sts get-caller-identity