File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed
Expand file tree Collapse file tree 1 file changed +14
-9
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
@@ -26,11 +29,13 @@ jobs:
2629 run : |
2730 python -m scripts.generate_json_schema_config
2831
29- - name : Check for changes in JSON Schema
32+ - name : Commit and push changes
33+ if : env.changed == 'true'
34+ env :
35+ GITHUB_TOKEN : ${{ github.token }}
3036 run : |
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
37+ git config --global user.name "github-actions[bot]"
38+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
39+ git add docs/optimizer_config.schema.json
40+ git commit -m "Update optimizer_config.schema.json"
41+ git push
You can’t perform that action at this time.
0 commit comments