Feat/api embeddings #614
Workflow file for this run
This file contains hidden or 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
| name: Check JSON Schema | |
| on: | |
| pull_request: | |
| permissions: | |
| contents: write | |
| jobs: | |
| generate-schema: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: "0.8.8" | |
| - name: Install dependencies | |
| run: | | |
| uv sync | |
| - name: Generate JSON Schema | |
| run: | | |
| uv run python -m scripts.generate_json_schema_config | |
| - name: Check for changes in JSON Schema | |
| id: check_changes | |
| run: | | |
| if git diff --quiet docs/optimizer_config.schema.json; then | |
| echo "No changes detected." | |
| echo "changed=false" >> $GITHUB_ENV | |
| else | |
| echo "Changes detected." | |
| echo "changed=true" >> $GITHUB_ENV | |
| fi | |
| - name: Commit and push changes | |
| if: env.changed == 'true' | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git add docs/optimizer_config.schema.json | |
| git commit -m "Update optimizer_config.schema.json" | |
| git push |