File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 push :
55 branches :
66 - main
7+ workflow_dispatch :
78
89jobs :
910 deploy :
@@ -24,15 +25,24 @@ jobs:
2425 id : login-ecr
2526 uses : aws-actions/amazon-ecr-login@v2
2627
28+ - name : Set up Docker Buildx
29+ uses : docker/setup-buildx-action@v3
30+
2731 - name : Build and push Docker image
2832 env :
2933 ECR_REGISTRY : ${{ steps.login-ecr.outputs.registry }}
3034 ECR_REPOSITORY : ${{ secrets.ECR_REPO }}
35+ IMAGE_TAG : ${{ github.sha }}
3136 run : |
32- docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:latest .
33- docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest
37+ docker buildx build \
38+ --platform linux/amd64 \
39+ -t $ECR_REGISTRY/$ECR_REPOSITORY:latest \
40+ -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG \
41+ --push \
42+ .
3443
3544 - name : Deploy to EKS
3645 run : |
3746 aws eks update-kubeconfig --name ${{ secrets.EKS_CLUSTER }} --region ${{ secrets.AWS_REGION }}
3847 kubectl rollout restart deployment fastapi -n fastapi
48+ kubectl rollout status deployment fastapi -n fastapi --timeout=5m
You can’t perform that action at this time.
0 commit comments