File tree Expand file tree Collapse file tree 7 files changed +67
-4
lines changed Expand file tree Collapse file tree 7 files changed +67
-4
lines changed Original file line number Diff line number Diff line change @@ -20,16 +20,29 @@ jobs:
20
20
uses : aws-actions/aws-cloudformation-github-deploy@v1
21
21
with :
22
22
name : GoCaptureGithubRole
23
- template : cloud-formation/github-role.yml
23
+ template : cloud-formation/github-role.yaml
24
24
parameter-overrides : " Repository=${{ github.repository }}"
25
25
capabilities : CAPABILITY_NAMED_IAM
26
26
no-fail-on-empty-changeset : 1
27
27
28
+ - name : Set ECR Stack Name
29
+ id : ecr-stack-name
30
+ run : echo ECR_STACK_NAME=GoCaptureECR >> $GITHUB_OUTPUT
31
+
28
32
- name : Deploy ECR repository
29
33
uses : aws-actions/aws-cloudformation-github-deploy@v1
30
34
with :
31
- name : GoCaptureECR
32
- template : cloud-formation/ecr.yml
35
+ name : ${{ steps.ecr-stack-name.outputs.ECR_STACK_NAME }}
36
+ template : cloud-formation/ecr.yaml
37
+ no-fail-on-empty-changeset : 1
38
+
39
+ - name : Beta Deploy User
40
+ uses : aws-actions/aws-cloudformation-github-deploy@v1
41
+ with :
42
+ name : GoCaptureBetaDeployUser
43
+ template : cloud-formation/beta-deploy-user.yaml
44
+ parameter-overrides : EcrStackName=${{ steps.ecr-stack-name.outputs.ECR_STACK_NAME }}
45
+ capabilities : CAPABILITY_NAMED_IAM
33
46
no-fail-on-empty-changeset : 1
34
47
35
48
- name : Login to Amazon ECR
Original file line number Diff line number Diff line change 26
26
uses : aws-actions/aws-cloudformation-github-deploy@v1
27
27
with :
28
28
name : GoCaptureECSCluster
29
- template : cloud-formation/ecs.yml
29
+ template : cloud-formation/ecs.yaml
30
30
no-fail-on-empty-changeset : 1
Original file line number Diff line number Diff line change
1
+ AWSTemplateFormatVersion : " 2010-09-09"
2
+ Parameters :
3
+ EcrStackName :
4
+ Type : String
5
+ Resources :
6
+ BetaDeployUser :
7
+ Type : AWS::IAM::User
8
+ Properties :
9
+ Path : /go_capture/
10
+ UserName : beta_deploy
11
+ EcrDeployPolicy :
12
+ Type : AWS::IAM::Policy
13
+ Properties :
14
+ PolicyName : EcrDeployPolicy
15
+ PolicyDocument :
16
+ Version : 2012-10-17
17
+ Statement :
18
+ - Effect : Allow
19
+ Action :
20
+ - ecr:GetAuthorizationToken
21
+ Resource : " *"
22
+ - Effect : Allow
23
+ Action :
24
+ - ecr:BatchGetImage
25
+ - ecr:DescribeImages
26
+ - ecr:DescribeRepositories
27
+ - ecr:GetDownloadUrlForLayer
28
+ - ecr:ListImages
29
+ Resource :
30
+ Fn::ImportValue :
31
+ Fn::Sub : ${EcrStackName}-RepositoryArn
32
+ Users :
33
+ - !Ref BetaDeployUser
Original file line number Diff line number Diff line change @@ -7,3 +7,9 @@ Resources:
7
7
EncryptionType : AES256
8
8
ImageScanningConfiguration :
9
9
ScanOnPush : true
10
+
11
+ Outputs :
12
+ GoCaptureRepository :
13
+ Value : !GetAtt Repository.Arn
14
+ Export :
15
+ Name : !Sub '${AWS::StackName}-RepositoryArn'
File renamed without changes.
Original file line number Diff line number Diff line change @@ -43,9 +43,15 @@ Resources:
43
43
{
44
44
" Effect " : Allow,
45
45
" Action " : [
46
+ iam:CreateUser,
47
+ iam:DeleteUser,
48
+ iam:DeleteUserPolicy,
46
49
iam:GetRole,
50
+ iam:GetUser,
51
+ iam:ListAccessKeys,
47
52
iam:PutRolePolicy,
48
53
iam:PutRoleRole,
54
+ iam:PutUserPolicy,
49
55
iam:UpdateAssumeRolePolicy,
50
56
],
51
57
" Resource " : " *"
@@ -63,6 +69,7 @@ Resources:
63
69
ecr:BatchGetImage,
64
70
ecr:CompleteLayerUpload,
65
71
ecr:CreateRepository,
72
+ ecr:DescribeRepositories,
66
73
ecr:GetAuthorizationToken,
67
74
ecr:GetDownloadUrlForLayer,
68
75
ecr:InitiateLayerUpload,
Original file line number Diff line number Diff line change 6
6
"private" : {
7
7
"host" : " 192.168.1.2" ,
8
8
"port" : " 8000"
9
+ },
10
+ "private-server" : {
11
+ "host" : " 192.168.1.9" ,
12
+ "port" : " 8000"
9
13
}
10
14
}
You can’t perform that action at this time.
0 commit comments