Skip to content

Commit

Permalink
Paametrize password
Browse files Browse the repository at this point in the history
  • Loading branch information
CihatAltiparmak authored Dec 14, 2023
1 parent 3102585 commit c0e8852
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
image: postgres
# Provide the password for postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_PASSWORD: ${{ secrets.EHAYVAN_SPRING_DATASOURCE_PASSWORD }}
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
Expand All @@ -32,7 +32,9 @@ jobs:
- uses: actions/checkout@v3

- name: Create new database
run: PGPASSWORD=postgres psql -h localhost -U postgres -c 'CREATE DATABASE e_hayvan_test_database;'
env:
PGPASSWORD: ${{ secrets.EHAYVAN_SPRING_DATASOURCE_PASSWORD }}
run: psql -h localhost -U postgres -c 'CREATE DATABASE e_hayvan_test_database;'
- name: Set Environment Variables
run: |
echo "EHAYVAN_SPRING_DATASOURCE_URL=${{ secrets.EHAYVAN_SPRING_DATASOURCE_URL }}" >> $GITHUB_ENV
Expand Down

0 comments on commit c0e8852

Please sign in to comment.