From 73ca781af88da1f81d29dbe2b646945416be06d5 Mon Sep 17 00:00:00 2001 From: Mike Alfare Date: Sat, 27 Jan 2024 19:16:49 -0500 Subject: [PATCH] grant access to the file for postgres user --- .github/actions/setup-postgres-linux/action.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-postgres-linux/action.yml b/.github/actions/setup-postgres-linux/action.yml index d61dc72f..74eef833 100644 --- a/.github/actions/setup-postgres-linux/action.yml +++ b/.github/actions/setup-postgres-linux/action.yml @@ -6,17 +6,23 @@ runs: steps: - name: Start the postgres service + shell: bash run: sudo systemctl start postgresql.service + + - name: Grant access to the directory shell: bash + run: sudo chown -R 777 ./scripts - name: Grant access to the file - run: sudo chown -R postgres:postgres ./scripts/setup_test_database.sql shell: bash + run: sudo chown -R postgres:postgres setup_test_database.sql + working-directory: ./scripts - name: Configure the database - run: sudo -u postgres psql -f ./scripts/setup_test_database.sql shell: bash + run: sudo -u postgres psql -f setup_test_database.sql + working-directory: ./scripts # - name: Configure the database -# run: sudo -u postgres bash ${{ github.action_path }}/setup_db.sh # shell: bash +# run: sudo -u postgres bash ${{ github.action_path }}/setup_db.sh