diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 85823b9..76e27ce 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -49,6 +49,14 @@ jobs: # Verify DinD is still working docker exec ci-dind docker version fi + + # If container exists but is not running, start it + if docker ps -a --format "table {{.Names}}\t{{.Status}}" | grep -q "^ci-dind.*Exited\|^ci-dind.*Created"; then + echo "DinD container exists but is not running, starting it..." + docker start ci-dind + # Wait for DinD to be ready + timeout 60 bash -c 'until docker exec ci-dind docker version; do sleep 2; done' + fi - name: Checkout code to DinD container run: |