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

This commit is contained in:
Orion Kindel 2023-07-19 18:16:53 -05:00
parent 28b6544975
commit e76d3de4d8
Signed by untrusted user who does not match committer: orion
GPG Key ID: 6D4165AE4C928719
3 changed files with 6 additions and 3 deletions

View File

@ -40,4 +40,5 @@ jobs:
git push
fi
env:
DOCKER_NETWORK_HOST: 'host.docker.internal'
DOCKER_HOST: 'unix:///run/user/1001/docker.sock' # HACK: rootless docker on gitea action runner

View File

@ -17,7 +17,8 @@ fi
docker compose stop "$base_or_head" 1>/dev/null
docker compose rm -f "$base_or_head" 1>/dev/null
url="postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:$port"
localhost=${DOCKER_NETWORK_HOST:-localhost}
url="postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$localhost:$port"
isready() {
local waited=0

View File

@ -14,8 +14,9 @@ fi;
migration="./migrations/${base}_to_${head}.sql"
base_url="postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/dnim"
head_url="postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5433/dnim"
localhost=${DOCKER_NETWORK_HOST:-localhost}
base_url="postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$localhost:5432/dnim"
head_url="postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$localhost:5433/dnim"
if [[ -z "$base" ]] || [[ -z "$head" ]]; then
echo "revisions to diff are required ex. ./scripts/diff.sh abc bcd" 1>&2;