diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 48993bea..005a4118 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -188,6 +188,33 @@ jobs: with: go-version: '1.25.4' cache: false + - name: Ensure Docker is running + run: | + if docker info >/dev/null 2>&1; then + exit 0 + fi + + if colima status >/dev/null 2>&1; then + colima stop --force || true + fi + + if ! colima start; then + colima stop --force || true + if ! colima start; then + colima delete --force + colima start + fi + fi + + for attempt in {1..30}; do + if docker info >/dev/null 2>&1; then + exit 0 + fi + echo "waiting for Docker daemon (${attempt}/30)" + sleep 2 + done + + docker info - name: Login to Docker Hub uses: docker/login-action@v3 with: