Skip to content

Merge pull request #307 from Codekill33/main #274

Merge pull request #307 from Codekill33/main

Merge pull request #307 from Codekill33/main #274

Workflow file for this run

name: Check schema sync
on:
push:
branches: ["main", "master"]
pull_request:
branches: ["main", "master"]
jobs:
check-schema:
name: Check schema is in sync
runs-on: ubuntu-latest
env:
BOUNDLESS_NESTJS_TOKEN: ${{ secrets.BOUNDLESS_NESTJS_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout canonical schema repo (private)
if: ${{ env.BOUNDLESS_NESTJS_TOKEN != '' }}
uses: actions/checkout@v4
with:
repository: boundlessfi/boundless-nestjs
path: boundless-nestjs
token: ${{ env.BOUNDLESS_NESTJS_TOKEN }}
- name: Note about private repo
if: ${{ env.BOUNDLESS_NESTJS_TOKEN == '' }}
run: |
echo "No secret BOUNDLESS_NESTJS_TOKEN provided; skipping checkout of private repo."
echo "This is expected for forked pull requests where repository secrets are not exposed."
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Run schema check
if: ${{ env.BOUNDLESS_NESTJS_TOKEN != '' }}
run: node ./scripts/sync-schema.js --check
- name: Skip schema check without private repo token
if: ${{ env.BOUNDLESS_NESTJS_TOKEN == '' }}
run: |
echo "Skipping schema sync check because BOUNDLESS_NESTJS_TOKEN is not available."
echo "Maintainers can run the full schema check from a trusted branch with the secret available."