Create database.yml

main
Félix MIELCAREK 11 months ago committed by GitHub
parent 8e9a11f08f
commit b5b1753d7d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,34 @@
name: database
on: [push]
jobs:
database-creation:
runs-on: ubuntu-latest
services:
# Label used to access the service container
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install dependencies
run: pip3 install mariadb
- name: Connect to PostgreSQL
run: python3 database/db-creation.py
env:
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
Loading…
Cancel
Save