Skip to content

Generate schema through workspace build script #2

Generate schema through workspace build script

Generate schema through workspace build script #2

name: Validate schemas
on:
pull_request:
push:
branches:
- main
jobs:
validate_schemas:
name: Validate schemas are up to date
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: dtolnay/rust-toolchain@stable
- name: Validate schemas are up to date
run: |
chmod +x ./scripts/build_schemas.sh
./scripts/build_schemas.sh -d true
- name: Add comment if failed
if: ${{ failure() }}
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Schema generation failed. Please run `just schemas` locally and upload the generated schemas.'
})