Skip to content

BCDA-8350: Add workflow to generate database docs #3

BCDA-8350: Add workflow to generate database docs

BCDA-8350: Add workflow to generate database docs #3

Workflow file for this run

# This workflow generates database documentation and ERD files.
#
name: Generate dbdocs
on:
pull_request:
paths:
- .github/workflows/dbdocs.yml
- db/migrations/bcda
- db/migrations/bcda_queue
env:
VAULT_PW: ${{ secrets.VAULT_PW }}
jobs:
generate-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Decrypt secrets
run: |
echo $VAULT_PW > .vault_password
bash ops/secrets --decrypt
mv -fv shared_files/encrypted/* shared_files/decrypted/
- name: Start DB
run: make start-db
- name: Generate docs
run: docker run --rm -v $PWD:/work -w /work --network bcda-app-net ghcr.io/k1low/tbls doc --rm-dist "postgres://postgres:toor@db:5432/bcda?sslmode=disable dbdocs/bcda
- name: Generate docs
run: docker run --rm -v $PWD:/work -w /work --network bcda-app-net ghcr.io/k1low/tbls doc "postgres://postgres:toor@queue:5432/bcda_queue?sslmode=disable dbdocs/bcda_queue
- uses: EndBug/add-and-commit@v9
with:
message: "Generate dbdocs"
default_author: github_actions