generated from teksi/template
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (45 loc) · 1.28 KB
/
datamodel-create-dumps.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: 📦 Datamodel | Create dumps
concurrency:
group: dumps-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- datamodel/**
- '.github/workflows/datamodel-create-dumps.yml'
workflow_dispatch:
workflow_call:
jobs:
datamodel-dumps:
name: Create dumps and schemaspy of datamodel
runs-on: ubuntu-latest
env:
COMPOSE_PROFILES: schemaspy
steps:
- uses: actions/checkout@v4
- name: Docker build
run: docker compose up -d --build
- name: Initialize container
run: docker compose exec db init_db.sh wait
- name: Create dumps
run: docker compose exec db /src/datamodel/scripts/create-dumps.py
- name: Schemaspy
run: docker compose run schemaspy
- name: Docker logs
if: failure()
run: docker compose logs db
- uses: actions/upload-artifact@v4
with:
name: datamodel-dumps
path: datamodel/artifacts/
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: datamodel-schemaspy
path: datamodel/schemaspy/
if-no-files-found: error