File tree Expand file tree Collapse file tree 3 files changed +24
-13
lines changed Expand file tree Collapse file tree 3 files changed +24
-13
lines changed Original file line number Diff line number Diff line change 16
16
- name : Configure AWS credentials
17
17
uses : aws-actions/configure-aws-credentials@v1-node16
18
18
with :
19
- role-to-assume : arn:aws:iam::200049542062:role/gocapture /GithubRole
19
+ role-to-assume : arn:aws:iam::200049542062:role/go_capture /GithubRole
20
20
aws-region : us-west-1
21
21
22
- - name : Deploy Github Role
23
- uses : aws-actions/aws-cloudformation-github-deploy@v1
24
- with :
25
- name : GoCaptureGithubRole
26
- template : cloud-formation/github-role.yaml
27
- parameter-overrides : " Repository=${{ github.repository }}"
28
- capabilities : CAPABILITY_NAMED_IAM
29
- no-fail-on-empty-changeset : 1
30
-
31
22
- name : Set ECR Stack Name
32
23
id : ecr-stack-name
33
24
run : echo ECR_STACK_NAME=GoCaptureECR >> $GITHUB_OUTPUT
Original file line number Diff line number Diff line change @@ -21,3 +21,8 @@ pre-commit install
21
21
``` shell
22
22
docker compose -f docker-compose-dev.yml -p go-capture-api up -d --build
23
23
```
24
+
25
+ ## Deploy GithubRole
26
+ ``` shell
27
+ aws cloudformation create-stack --stack-name GoCaptureGithubRole --parameters ParameterKey=Repository,ParameterValue=< github-repo> --template-body " $( cat cloud-formation/github-role.yaml) " --capabilities CAPABILITY_NAMED_IAM
28
+ ```
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ Resources:
16
16
Condition :
17
17
StringLike :
18
18
token.actions.githubusercontent.com:sub : !Sub repo:${Repository}:*
19
- Path : /gocapture /
19
+ Path : /go_capture /
20
20
Policies :
21
21
- PolicyName : CloudFormationPolicy
22
22
PolicyDocument : {
@@ -37,6 +37,21 @@ Resources:
37
37
]
38
38
}
39
39
- PolicyName : IamPolicy
40
+ PolicyDocument : {
41
+ " Version " : " 2012-10-17" ,
42
+ " Statement " : [
43
+ {
44
+ " Effect " : Allow,
45
+ " Action " : [
46
+ iam:GetRole,
47
+ iam:GetUser,
48
+ iam:ListAccessKeys,
49
+ ],
50
+ " Resource " : " arn:aws:iam::200049542062:user/go_capture/*"
51
+ },
52
+ ]
53
+ }
54
+ - PolicyName : IamDeployUserPolicy
40
55
PolicyDocument : {
41
56
" Version " : " 2012-10-17" ,
42
57
" Statement " : [
@@ -48,13 +63,13 @@ Resources:
48
63
iam:DeleteUserPolicy,
49
64
iam:GetRole,
50
65
iam:GetUser,
51
- iam:ListAccessKeys,
52
66
iam:PutRolePolicy,
53
67
iam:PutRoleRole,
54
68
iam:PutUserPolicy,
55
69
iam:UpdateAssumeRolePolicy,
70
+ iam:ListAccessKeys,
56
71
],
57
- " Resource " : " * "
72
+ " Resource " : " arn:aws:iam::200049542062:user/go_capture/beta_deploy "
58
73
},
59
74
]
60
75
}
You can’t perform that action at this time.
0 commit comments