Skip to content

Commit

Permalink
grant access to the file for postgres user
Browse files Browse the repository at this point in the history
  • Loading branch information
mikealfare committed Jan 28, 2024
1 parent e0ea031 commit 73ca781
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/actions/setup-postgres-linux/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 73ca781

Please sign in to comment.