-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
41 lines (35 loc) · 962 Bytes
/
config.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
version: '2.1'
orbs:
# import CircleCI's aws-cli orb
aws-cli: circleci/[email protected]
jobs:
aws-example:
docker:
- image: cimg/aws:2022.06
steps:
- checkout
# run the aws-cli/setup command from the orb
- aws-cli/setup:
role-arn: 'arn:aws:iam::${ACCOUNT_ID}:role/${ROLE_NAME}'
# aws-region: ap-southeast-2
# optional parameters
# profile-name: "OIDC-PROFILE"
role-session-name: example-session
# session-duration: 1800
- when:
condition:
equal: [ 'placeholder', << pipeline.git.branch >> ]
steps:
- run:
name: 'AWS STS'
command: 'aws sts get-caller-identity'
workflows:
OIDC-with-AWS:
jobs:
- aws-example:
# must use a valid CircleCI context (https://circleci.com/docs/contexts/)
context: aws
filters:
branches:
only:
- placeholder