diff --git a/.github/workflows/pr-close.yml b/.github/workflows/pr-close.yml index 3fd592070..17b4d2482 100644 --- a/.github/workflows/pr-close.yml +++ b/.github/workflows/pr-close.yml @@ -19,12 +19,12 @@ jobs: with: cleanup: helm packages: backend frontend migrations + cleanup_db: # TODO move it off to another action later. - name: Remove DB User from crunchy. + name: Remove DB User from crunchy runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - name: Checkout - name: Install CLI tools from OpenShift Mirror uses: redhat-actions/openshift-tools-installer@v1 with: @@ -39,7 +39,7 @@ jobs: oc login --token=$OC_TEMP_TOKEN --server=https://api.silver.devops.gov.bc.ca:6443 oc project ${{ secrets.oc_namespace }} # Safeguard! - - name: Remove PR user and database from crunchy. + - name: Remove PR user and database from crunchy shell: bash run: | # check if postgres-crunchy exists or else exit diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index 140223e06..9d745d2ae 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -54,48 +54,11 @@ jobs: fi done - generate-schema-spy: - name: Generate SchemaSpy Documentation - runs-on: ubuntu-24.04 - services: - postgres: - image: postgis/postgis:16-3.4 - env: - POSTGRES_DB: default - POSTGRES_USER: postgres - 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 - - name: Flyway - uses: docker://flyway/flyway:10 - env: - FLYWAY_URL: jdbc:postgresql://postgres:5432/default - FLYWAY_USER: postgres - FLYWAY_PASSWORD: default - FLYWAY_LOCATIONS: filesystem:./migrations - FLYWAY_DEFAULT_SCHEMA: "users" - with: - args: info migrate info + # https://github.com/bcgov/quickstart-openshift-helpers + schema-spy: + name: SchemaSpy Documentation + uses: bcgov/quickstart-openshift-helpers/.github/workflows/.schema-spy.yml@v0.9.0 - - 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 pgsql11 -db default -host 127.0.0.1 -port 5432 -u postgres -p default -schemas users - - name: Deploy to Pages - uses: JamesIves/github-pages-deploy-action@v4 - with: - folder: output - target-folder: schemaspy tests: name: Tests