Skip to content
29 changes: 29 additions & 0 deletions .github/workflows/schema-spy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: SchemaSpy

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

on:
push:
branches: [main]
paths:
- "backend/src/main/resources/db/migration/**"
- "backend/src/main/resources/db/migration-dev/**"
workflow_dispatch:

permissions: {}

jobs:
schemaspy:
name: Generate SchemaSpy Documentation and Push to GitHub Pages
permissions:
contents: write
pages: write
Comment on lines +21 to +22
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The job is intended to publish to GitHub Pages, but it only grants contents: write and pages: write. If the reusable SchemaSpy workflow uses the official GitHub Pages deployment flow (actions/deploy-pages), it also requires id-token: write (and the caller must grant it). Consider adding id-token: write here, and (if branch pushes aren’t required) reducing contents to read for least privilege.

Suggested change
contents: write
pages: write
contents: read
pages: write
id-token: write

Copilot uses AI. Check for mistakes.
uses: bcgov/quickstart-openshift-helpers/.github/workflows/.schema-spy.yml@ca6579bdadf383a2513397081f963889b92823a4 # v1.1.0
with:
flyway_locations: >-
filesystem:./backend/src/main/resources/db/migration,
filesystem:./backend/src/main/resources/db/migration-dev
Comment on lines +25 to +27
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flyway_locations is defined as a folded scalar (>-) across two lines, which will insert a space after the comma in the final value. If the downstream workflow splits locations on commas without trimming, the second entry can end up with a leading space and be treated as an invalid location. Safer options are to put this on a single line or ensure entries are trimmed in the called workflow.

Suggested change
flyway_locations: >-
filesystem:./backend/src/main/resources/db/migration,
filesystem:./backend/src/main/resources/db/migration-dev
flyway_locations: filesystem:./backend/src/main/resources/db/migration,filesystem:./backend/src/main/resources/db/migration-dev

Copilot uses AI. Check for mistakes.
flyway_schema: silva
schemaspy_schema: silva
Loading