fix: gen-migrations workflow
Some checks failed
gen-migrations / gen-migrations (push) Failing after 5s

This commit is contained in:
Orion Kindel
2023-07-18 22:29:40 -05:00
parent 4b9a59a7a3
commit ba00e4b8cb

View File

@@ -20,7 +20,16 @@ docker compose rm -f "$base_or_head" 1>/dev/null
url="postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:$port"
isready() {
until pg_isready -p "$port" 1>/dev/null; do true; done;
local waited=0
until pg_isready -p "$port" 1>/dev/null; do
if [[ "$waited" = "10" ]]; then
docker compose logs base
exit 1
fi
sleep 1
$(( waited++ ))
done;
}
initdb() {