Skip to content

Commit 344a87b

Browse files
authored
[Hotfix] Enable GitHub Actions for v0.4 branch and fix PostgreSQL env vars (#1184)
* move postgres folder to root * Add .env.example file at postgresql * change test.yml * define env variable at workflow level
1 parent a61fad9 commit 344a87b

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

.github/workflows/test.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,19 @@ on:
44
push:
55
branches:
66
- main
7+
- v0.4
78
pull_request:
89
branches:
910
- main
11+
- v0.4
1012

1113
env:
1214
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
15+
POSTGRES_USER: postgres
16+
POSTGRES_PASSWORD: postgres
17+
POSTGRES_DB: postgres
18+
POSTGRES_HOST: localhost
19+
POSTGRES_PORT: 5432
1320

1421
jobs:
1522
build:
@@ -18,11 +25,9 @@ jobs:
1825
postgres:
1926
image: postgres:16
2027
env:
21-
POSTGRES_HOST: localhost
22-
POSTGRES_PORT: 5432
23-
POSTGRES_USER: postgres
24-
POSTGRES_PASSWORD: postgres
25-
POSTGRES_DB: postgres
28+
POSTGRES_USER: ${{ env.POSTGRES_USER }}
29+
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
30+
POSTGRES_DB: ${{ env.POSTGRES_DB }}
2631
options: >-
2732
--health-cmd pg_isready
2833
--health-interval 5s

postgresql/.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
POSTGRES_HOST=localhost
2+
POSTGRES_PORT=5432
3+
POSTGRES_USER=postgres
4+
POSTGRES_PASSWORD=postgres
5+
POSTGRES_DB=postgres

0 commit comments

Comments
 (0)