Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion .github/workflows/schema-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:

permissions:
contents: write
pull-requests: write

jobs:
generate-schema:
Expand All @@ -24,9 +25,32 @@ jobs:
cache: npm
- run: npm ci
- run: node --run website-generate-schema
- uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0

# On pull requests, commit the regenerated schema back into the PR branch
# so the schema change rides along with the PR that caused it.
- if: github.event_name == 'pull_request'
uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0
with:
commit_message: 'chore(schema): auto generate schema'
commit_user_name: "github-actions[bot]"
commit_user_email: "github-actions[bot]@users.noreply.github.com"
commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"

# On main (e.g. after a version bump), direct pushes are blocked by the
# branch ruleset (pull_request required), so deliver the regenerated
# schema as a PR instead. COMMITTER_TOKEN is used so the PR triggers CI
# and is mergeable.
- if: github.event_name != 'pull_request'
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
token: ${{ secrets.COMMITTER_TOKEN }}
commit-message: 'chore(schema): auto generate schema'
branch: chore/schema-update
delete-branch: true
title: 'chore(schema): Update configuration JSON schema'
body: |
Automated schema update generated by the Update Schema workflow.

Direct pushes to `main` are blocked by the branch ruleset, so the
regenerated schema is delivered as this PR instead.
author: 'github-actions[bot] <github-actions[bot]@users.noreply.github.com>'
Loading