This repository has been archived by the owner on Feb 1, 2024. It is now read-only.
generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding schema spy as a separate workflow. (#10)
- Loading branch information
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: SchemaSpy | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
generate-schema-spy: | ||
name: Generate SchemaSpy Documentation | ||
runs-on: ubuntu-22.04 | ||
services: | ||
postgres: | ||
image: postgres | ||
env: | ||
POSTGRES_DB: default | ||
POSTGRES_USER: default | ||
POSTGRES_PASSWORD: default | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 5432:5432 | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: joshuaavalon/[email protected] | ||
name: Generate SchemaSpy docs for node backend | ||
with: | ||
url: jdbc:postgresql://postgres:5432/default | ||
user: default | ||
password: default | ||
env: | ||
FLYWAY_VALIDATE_MIGRATION_NAMING: true | ||
FLYWAY_LOCATIONS: filesystem:./migrations | ||
FLYWAY_DEFAULT_SCHEMA: "data_access" | ||
|
||
- name: Create Output Folder | ||
run: | | ||
mkdir output | ||
chmod a+rwx -R output | ||
- name: Run Schemaspy | ||
run: docker run --network host -v "$PWD/output:/output" schemaspy/schemaspy:6.2.4 -t pgsql -db default -host 127.0.0.1 -port 5432 -u default -p default -schemas data_access | ||
- name: Deploy to Pages | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
folder: output | ||
target-folder: schemaspy |