Skip to content

Commit 9b20d6c

Browse files
authored
Merge pull request #924 from rasmi/fix-schema-update
Use PR workflow for schema regeneration.
2 parents 79df52d + 89ec5be commit 9b20d6c

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

.github/workflows/ci.yaml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ jobs:
8888

8989
permissions:
9090
contents: write
91+
pull-requests: write
9192

9293
steps:
9394
- uses: actions/checkout@v4
@@ -139,16 +140,14 @@ jobs:
139140
run: |
140141
cd scripts && uv run pyright deliberate_lab/
141142
142-
- name: Commit and push if changed
143-
run: |
144-
git config user.name "github-actions[bot]"
145-
git config user.email "github-actions[bot]@users.noreply.github.com"
146-
git add docs/assets/api/schemas.json scripts/deliberate_lab/
147-
if git diff --staged --quiet; then
148-
echo "No changes to commit"
149-
else
150-
git commit -m "chore: update generated schemas and Python types
151-
152-
🤖 Auto-generated by GitHub Actions"
153-
git push
154-
fi
143+
- name: Create PR if schemas changed
144+
uses: peter-evans/create-pull-request@v8
145+
with:
146+
token: ${{ secrets.GITHUB_TOKEN }}
147+
commit-message: "chore: update generated schemas and Python types"
148+
title: "chore: update generated schemas and Python types"
149+
body: "🤖 Auto-generated by GitHub Actions"
150+
branch: auto-update-schemas
151+
add-paths: |
152+
docs/assets/api/schemas.json
153+
scripts/deliberate_lab/

0 commit comments

Comments
 (0)