Commit 7a59b03 1 parent 2b772c4 commit 7a59b03 Copy full SHA for 7a59b03
File tree 2 files changed +6
-24
lines changed
2 files changed +6
-24
lines changed Original file line number Diff line number Diff line change @@ -58,31 +58,21 @@ jobs:
58
58
id : login-ecr
59
59
uses : aws-actions/amazon-ecr-login@v1
60
60
61
- - name : Build Image
62
- id : build_image
61
+ - name : Build Image and Push to AWS ECR
62
+ id : build_image_and_push
63
63
uses : docker/build-push-action@v5
64
64
env :
65
65
ECR_REGISTRY : ${{ steps.login-ecr.outputs.registry }}
66
66
IMAGE_TAG : ${{ steps.tag.outputs.tag }}
67
67
ECR_REPOSITORY : taxi-back
68
68
with :
69
+ push : true
69
70
tags : |
70
71
"${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}"
71
72
"${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:latest"
72
73
cache-from : type=local,src=/tmp/.buildx-cache
73
74
cache-to : type=local,dest=/tmp/.buildx-cache-new
74
75
75
- - name : Push to AWS ECR
76
- id : push_image
77
- env :
78
- ECR_REGISTRY : ${{ steps.login-ecr.outputs.registry }}
79
- IMAGE_TAG : ${{ steps.tag.outputs.tag }}
80
- ECR_REPOSITORY : taxi-back
81
- run : |
82
- docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
83
- docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest
84
- echo "Push image : $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG and latest"
85
-
86
76
- name : Remove old cache
87
77
run : |
88
78
rm -rf /tmp/.buildx-cache
Original file line number Diff line number Diff line change @@ -43,25 +43,17 @@ jobs:
43
43
id : login-ecr
44
44
uses : aws-actions/amazon-ecr-login@v1
45
45
46
- - name : Build Image
47
- id : build_image
46
+ - name : Build Image and Push to AWS ECR
47
+ id : build_image_and_push
48
48
uses : docker/build-push-action@v5
49
49
env :
50
50
ECR_REGISTRY : ${{ steps.login-ecr.outputs.registry }}
51
51
ECR_REPOSITORY : taxi-back
52
52
with :
53
+ push : true
53
54
tags : " ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:dev"
54
55
cache-from : type=local,src=/tmp/.buildx-cache
55
56
cache-to : type=local,dest=/tmp/.buildx-cache-new
56
-
57
- - name : Push to AWS ECR
58
- id : push_image
59
- env :
60
- ECR_REGISTRY : ${{ steps.login-ecr.outputs.registry }}
61
- ECR_REPOSITORY : taxi-back
62
- run : |
63
- docker push $ECR_REGISTRY/$ECR_REPOSITORY:dev
64
- echo "Push image : $ECR_REGISTRY/$ECR_REPOSITORY:dev"
65
57
66
58
- name : Remove old cache
67
59
run : |
You can’t perform that action at this time.
0 commit comments