@@ -23,45 +23,45 @@ jobs:
23
23
run : |
24
24
docker build -t temp:latest -f Dockerfile .
25
25
26
- - name : Configure AWS credentials Prod
26
+ - name : Configure AWS credentials Staging
27
27
uses : aws-actions/configure-aws-credentials@v1.7.0
28
28
29
29
with :
30
- role-to-assume : arn:aws:iam::671250183987 :role/GitHub2ECR # check terraform output
30
+ role-to-assume : arn:aws:iam::992382665735 :role/GitHub2ECR # check terraform output
31
31
32
32
role-session-name : GitHub_to_AWS_via_FederatedOIDC
33
33
aws-region : us-east-1
34
34
35
- - name : Login to Amazon ECR Prod
36
- id : login-ecr-management-prod
35
+ - name : Login to Amazon ECR Staging
36
+ id : login-ecr-management-staging
37
37
uses : aws-actions/amazon-ecr-login@v2
38
38
39
- - name : Tag and Push Image to Amazon ECR Prod
39
+ - name : Tag and Push Image to Amazon ECR Staging
40
40
env :
41
- ECR_REGISTRY : ${{ steps.login-ecr-management-prod .outputs.registry }}
41
+ ECR_REGISTRY : ${{ steps.login-ecr-management-staging .outputs.registry }}
42
42
ECR_REPOSITORY : ml-repository
43
43
IMAGE_TAG : scholarag-${{ github.ref_name }}
44
44
run : |
45
45
docker tag temp:latest $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
46
46
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
47
47
docker tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG temp:latest
48
48
49
- - name : Configure AWS credentials Staging
49
+ - name : Configure AWS credentials Prod
50
50
uses : aws-actions/configure-aws-credentials@v1.7.0
51
51
52
52
with :
53
- role-to-assume : arn:aws:iam::992382665735 :role/GitHub2ECR # check terraform output
53
+ role-to-assume : arn:aws:iam::671250183987 :role/GitHub2ECR # check terraform output
54
54
55
55
role-session-name : GitHub_to_AWS_via_FederatedOIDC
56
56
aws-region : us-east-1
57
57
58
- - name : Login to Amazon ECR Staging
59
- id : login-ecr-management-staging
58
+ - name : Login to Amazon ECR Prod
59
+ id : login-ecr-management-prod
60
60
uses : aws-actions/amazon-ecr-login@v2
61
61
62
- - name : Tag and Push Image to Amazon ECR Staging
62
+ - name : Tag and Push Image to Amazon ECR Prod
63
63
env :
64
- ECR_REGISTRY : ${{ steps.login-ecr-management-staging .outputs.registry }}
64
+ ECR_REGISTRY : ${{ steps.login-ecr-management-prod .outputs.registry }}
65
65
ECR_REPOSITORY : ml-repository
66
66
IMAGE_TAG : scholarag-${{ github.ref_name }}
67
67
run : |
0 commit comments