Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

update health check

Maidul Islamd3a06b82e6e6
diff --git a/.github/workflows/check-api-for-breaking-changes.yml b/.github/workflows/check-api-for-breaking-changes.yml
index a3939a247e..1c038325f1 100644
--- a/.github/workflows/check-api-for-breaking-changes.yml
+++ b/.github/workflows/check-api-for-breaking-changes.yml
@@ -42,8 +42,26 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: '1.21.5'
- - name: Wait for containers to be stable
- run: timeout 60s sh -c 'until docker ps | grep infisical-api | grep -q healthy; do echo "Waiting for container to be healthy..."; sleep 2; done'
+ - name: Wait for container to be stable and check logs
+ run: |
+ SECONDS=0
+ HEALTHY=0
+ while [ $SECONDS -lt 60 ]; do
+ if docker ps | grep infisical-api | grep -q healthy; then
+ echo "Container is healthy."
+ HEALTHY=1
+ break
+ fi
+ echo "Waiting for container to be healthy... ($SECONDS seconds elapsed)"
+ docker logs infisical-api --tail 10 # Show the last 10 lines of logs
+ sleep 2
+ SECONDS=$((SECONDS+2))
+ done
+
+ if [ $HEALTHY -ne 1 ]; then
+ echo "Container did not become healthy in time"
+ exit 1
+ fi
- name: Install openapi-diff
run: go install github.com/tufin/oasdiff@latest
- name: Running OpenAPI Spec diff action