From b1196d229f724332f60b6b09dc48f280184e99d4 Mon Sep 17 00:00:00 2001 From: Karl Horky Date: Wed, 3 Apr 2024 16:21:11 +0200 Subject: [PATCH] Create database before creating user --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8383f1..6e002fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,8 +25,9 @@ jobs: pg_ctl start # sudo systemctl start postgresql.service pg_isready - # createdb --owner=$PGUSERNAME $PGDATABASE - # psql --host "$PGHOST" --command="CREATE USER $PGUSERNAME PASSWORD '$PGPASSWORD'" --command="\du" + createdb $PGDATABASE + psql --host "$PGHOST" --command="CREATE USER $PGUSERNAME PASSWORD '$PGPASSWORD'" --command="\du" + psql --host "$PGHOST" --command="GRANT ALL PRIVILEGES ON DATABASE $PGDATABASE TO $PGUSERNAME" --command="\l" # - name: Create database user # run: | # sudo -u postgres psql --command="CREATE USER $PGUSERNAME PASSWORD '$PGPASSWORD'" --command="\du"