Skip to content

Commit 20d288b

Browse files
committed
Added the postgresql service so that is available to connect to a database and configured env variables
1 parent 1e11bb0 commit 20d288b

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/gitflow.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ on:
1111
jobs:
1212
build:
1313
runs-on: ubuntu-latest
14+
services:
15+
postgres:
16+
image: postgres:17
17+
env:
18+
POSTGRES_USER: ${{ secrets.DB_USER }}
19+
POSTGRES_PASSWORD: ${{ secrets.DB_PASSWORD }}
20+
POSTGRES_DB: ${{ secrets.DB_NAME }}
21+
ports:
22+
- 5432:5432
1423

1524
steps:
1625
- name: Checkout the code
@@ -32,13 +41,13 @@ jobs:
3241
DB_NAME: ${{ secrets.DB_NAME }}
3342
DB_USER: ${{ secrets.DB_USER }}
3443
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
35-
DB_HOST: ${{ secrets.DB_HOST }}
36-
DB_PORT: ${{ secrets.DB_PORT }}
44+
DB_HOST: postgres
45+
DB_PORT: "5432"
3746
run: |
3847
python manage.py test --verbosity=2
3948
4049
release:
41-
name: Create Release Tag
50+
name: Set the Release Tag
4251
if: github.ref == 'refs/heads/release/*'
4352
needs: build
4453
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)