File tree Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Original file line number Diff line number Diff line change 11name : Build to AWS ECR
22
3- on : push
3+ on : push
44
55jobs :
66 login-to-aws :
@@ -14,28 +14,25 @@ jobs:
1414 with :
1515 aws-access-key-id : ${{ secrets.ACCESS_KEY }}
1616 aws-secret-access-key : ${{ secrets.SECRET_ACCESS_KEY }}
17- aws-region : ${{ secrets.PUBLIC_REGION }}
17+ aws-region : ${{ secrets.REGION }}
1818
1919 build-and-push-pub-ecr :
2020 runs-on : ubuntu-latest
21- needs :
22- login-to-aws :
23-
21+ needs : login-to-aws
22+
2423 steps :
2524 - name : Code Checkout
2625 uses : actions/checkout@v4
2726
28- - name : Login to AWSECR
27+ - name : Login to AWS ECR
2928 uses : docker/login-action@v3
3029 with :
3130 registry : public.ecr.aws
3231 username : ${{ secrets.ACCESS_KEY }}
3332 password : ${{ secrets.SECRET_ACCESS_KEY }}
34- env :
35- aws-region : ${{ secrets.PUBLIC_REGION }}
36-
37- - name : Build Image
33+
34+ - name : Build and Push Image
3835 run : |
39- docker build -t bank .
40- docker tag bank:latest public.ecr.aws/h8o8x8t1/bank:v2
41- docker push public.ecr.aws/h8o8x8t1/bank:v2
36+ docker build -t bank .
37+ docker tag bank:latest public.ecr.aws/h8o8x8t1/bank:v1
38+ docker push public.ecr.aws/h8o8x8t1/bank:v1
You can’t perform that action at this time.
0 commit comments