Skip to content

Commit 063391a

Browse files
update schema on commit (#137)
* update schema on commit * try ci * Update optimizer_config.schema.json * Update _schemas.py * Update optimizer_config.schema.json --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 9900d43 commit 063391a

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

.github/workflows/check-schema.yaml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ name: Check JSON Schema
22

33
on:
44
pull_request:
5-
branches:
6-
- dev
5+
6+
permissions:
7+
contents: write
78

89
jobs:
910
generate-schema:
@@ -12,6 +13,8 @@ jobs:
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
@@ -28,9 +31,19 @@ jobs:
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

0 commit comments

Comments
 (0)