File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed
Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,9 @@ name: Check JSON Schema
22
33on :
44 pull_request :
5- branches :
6- - dev
5+
6+ permissions :
7+ contents : write
78
89jobs :
910 generate-schema :
1213 steps :
1314 - name : Checkout repository
1415 uses : actions/checkout@v4
16+ with :
17+ ref : ${{ github.head_ref }}
1518
1619 - name : Set up Python
1720 uses : actions/setup-python@v5
2831
2932 - name : Check for changes in JSON Schema
3033 run : |
31- if ! git diff --quiet docs/optimizer_config.schema.json; then
34+ if ! git diff docs/optimizer_config.schema.json; then
3235 echo "Error: docs/optimizer_config.schema.json has been modified after running the generator script."
33- exit 1
3436 else
3537 echo "No changes detected in docs/optimizer_config.schema.json."
38+ exit 0
3639 fi
40+
41+ - name : Commit and push changes
42+ env :
43+ GITHUB_TOKEN : ${{ github.token }}
44+ run : |
45+ git config --global user.name "github-actions[bot]"
46+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
47+ git add docs/optimizer_config.schema.json
48+ git commit -m "Update optimizer_config.schema.json"
49+ git push
You can’t perform that action at this time.
0 commit comments