From a926ebcf8c1b998766e510e3e8faebab0121345e Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Sat, 20 Dec 2025 12:50:02 +0900 Subject: [PATCH] feat(ci): auto-commit schema.json changes on master push MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Automatically commits schema changes generated by build step - Runs only on master branch push events - Uses github-actions bot account for commits - Reduces manual schema update commits 🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode) --- .github/workflows/ci.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d617fc..2ced1b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,8 +48,12 @@ jobs: build: runs-on: ubuntu-latest needs: [test, typecheck] + permissions: + contents: write steps: - uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} - uses: oven-sh/setup-bun@v2 with: @@ -68,6 +72,19 @@ jobs: test -f dist/index.js || (echo "ERROR: dist/index.js not found!" && exit 1) test -f dist/index.d.ts || (echo "ERROR: dist/index.d.ts not found!" && exit 1) + - name: Auto-commit schema changes + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + run: | + if git diff --quiet assets/oh-my-opencode.schema.json; then + echo "No schema changes to commit" + else + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add assets/oh-my-opencode.schema.json + git commit -m "chore: auto-update schema.json" + git push + fi + draft-release: runs-on: ubuntu-latest needs: [build]