We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 617010a commit 865ec82Copy full SHA for 865ec82
.github/workflows/cd.yml
@@ -77,5 +77,15 @@ jobs:
77
- name: Health check
78
run: |
79
echo "Waiting application startup..."
80
- sleep 10
81
- curl -f http://${{ secrets.EC2_HOST }}:8080/health
+
+ for i in {1..20}; do
82
+ echo "Health check attempt $i"
83
+ if curl -f http://${{ secrets.EC2_HOST }}:8080/health; then
84
+ echo "Application is UP"
85
+ exit 0
86
+ fi
87
+ sleep 5
88
+ done
89
90
+ echo "Application did not become healthy"
91
+ exit 1
0 commit comments