File tree Expand file tree Collapse file tree 1 file changed +9
-20
lines changed
Expand file tree Collapse file tree 1 file changed +9
-20
lines changed Original file line number Diff line number Diff line change 55 branches :
66 - dev
77
8- permissions :
9- contents : write
10-
118jobs :
129 generate-schema :
1310 runs-on : ubuntu-latest
1411
1512 steps :
1613 - name : Checkout repository
1714 uses : actions/checkout@v4
18- with :
19- ref : ${{ github.head_ref }}
2015
2116 - name : Set up Python
2217 uses : actions/setup-python@v5
@@ -25,23 +20,17 @@ jobs:
2520
2621 - name : Install dependencies
2722 run : |
28- pip install .
23+ pip install .
2924
3025 - name : Generate JSON Schema
31- run : python scripts/generate_json_schema_config.py
32-
33- - name : Check for changes
34- id : check_changes
3526 run : |
36- git diff --exit-code docs/optimizer_config.schema.json || echo "changed=true" >> $GITHUB_ENV
27+ python scripts/generate_json_schema_config.py
3728
38- - name : Commit and push changes
39- if : env.changed == 'true'
40- env :
41- GITHUB_TOKEN : ${{ github.token }}
29+ - name : Check for changes in JSON Schema
4230 run : |
43- git config --global user.name "github-actions[bot]"
44- git config --global user.email "github-actions[bot]@users.noreply.github.com"
45- git add docs/optimizer_config.schema.json
46- git commit -m "Update optimizer_config.schema.json"
47- git push
31+ if ! git diff --quiet docs/optimizer_config.schema.json; then
32+ echo "Error: docs/optimizer_config.schema.json has been modified after running the generator script."
33+ exit 1
34+ else
35+ echo "No changes detected in docs/optimizer_config.schema.json."
36+ fi
You can’t perform that action at this time.
0 commit comments