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

This commit is contained in:
Orion Kindel 2023-07-19 20:51:30 -05:00
parent 6941558d66
commit cda6320977
Signed by untrusted user who does not match committer: orion
GPG Key ID: 6D4165AE4C928719

View File

@ -15,25 +15,14 @@ else
fi fi
docker compose rm -vsf "$base_or_head" docker compose rm -vsf "$base_or_head"
until ! pg_isready -p "$port" 1>/dev/null; do true; done; until ! pg_isready -q -p "$port"; do true; done;
db() { db() {
echo -n "postgresql:///$1?port=$port&user=$POSTGRES_USER&password=$POSTGRES_PASSWORD" echo -n "postgresql:///$1?port=$port&user=$POSTGRES_USER&password=$POSTGRES_PASSWORD"
} }
isready() { isready() {
local waited=0 until pg_isready -q -p "$port"; do true; done;
until pg_isready -p "$port" 1>/dev/null; do
if [[ "$waited" = "10" ]]; then
pwd
cat docker-compose.yml
docker compose logs base
exit 1
fi
sleep 1
echo $(( waited++ ))
done;
} }
initdb() { initdb() {