Skip to content

Commit

Permalink
put shared postgres settings in global env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenglimEar committed Jul 3, 2024
1 parent ef9e09a commit 6d4cad4
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: "Generate Website Data"
on:
workflow_dispatch:
push:
env:
POSTGRES_USER: app_user
POSTGRES_DB: disclosure-backend
POSTGRES_PASSWORD: app_password
jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -68,17 +72,17 @@ jobs:
SERVICE_ACCOUNT_KEY_JSON: ${{ secrets.SERVICE_ACCOUNT_KEY_JSON }}
GDRIVE_FOLDER: ${{ vars.GDRIVE_FOLDER }}
PGHOST: postgres
PGDATABASE: disclosure-backend
PGUSER: app_user
PGPASSWORD: app_password
PGDATABASE: ${{ env.POSTGRES_DB }}
PGUSER: ${{ env.POSTGRES_USER }}
PGPASSWORD: ${{ env.POSTGRES_PASSWORD }}
services:
postgres:
#image: postgres:9.6-bullseye
image: postgres:15.6-bullseye
env:
POSTGRES_USER: app_user
POSTGRES_DB: disclosure-backend
POSTGRES_PASSWORD: app_password
POSTGRES_USER: ${{ env.POSTGRES_USER }}
POSTGRES_DB: ${{ env.POSTGRES_DB }}
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
steps:
- uses: actions/checkout@v4
- name: Check setup
Expand Down

0 comments on commit 6d4cad4

Please sign in to comment.