-
Notifications
You must be signed in to change notification settings - Fork 8
69 lines (61 loc) · 1.95 KB
/
erdiagram.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
58
59
60
61
62
63
64
65
66
67
68
69
name: Manual ER Diagram
on:
workflow_dispatch:
inputs:
jobs:
diagrams:
name: Manual ER Diagram
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_DB: ${{ secrets.POSTGRES_DB }}
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Go environment
uses: actions/setup-go@v2.1.3
with:
go-version: '1.14.0'
- name: Setup Java JDK
uses: actions/setup-java@v2.1.0
with:
distribution: 'zulu'
java-version: '16'
- name: Planet Farms API
run: |
cd api
echo "JWT_SECRET=secret" >> .env
echo "DATABASE_NAME=${{ secrets.POSTGRES_DB }}" >> .env
echo "DATABASE_USERNAME=${{ secrets.POSTGRES_USER }}" >> .env
echo "DATABASE_PASSWORD=${{ secrets.POSTGRES_PASSWORD }}" >> .env
echo "DATABASE_HOST=localhost" >> .env
echo "AUTH_METHOD=local" >> .env
npm i
npx sequelize-cli db:migrate
cd ..
go get -u github.com/achiku/planter
sudo apt install graphviz
mkdir -p diagrams
cd diagrams
wget https://versaweb.dl.sourceforge.net/project/plantuml/plantuml.jar
planter postgres://test:pass@localhost:5432/planetfarms?sslmode=disable -o diagram.uml
java -jar plantuml.jar -verbose diagram.uml
cd ..
- name: Upload Diagrams
uses: actions/upload-artifact@v2
with:
name: diagrams
path: diagrams/diagram*