schema-update.yml

 1name: Update Schema
 2
 3on:
 4  push:
 5    branches: [main]
 6    paths:
 7      - "internal/config/**"
 8
 9jobs:
10  update-schema:
11    runs-on: ubuntu-latest
12    steps:
13      - uses: actions/checkout@v5
14        with:
15          token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
16      - uses: actions/setup-go@v5
17        with:
18          go-version-file: go.mod
19      - run: go run . schema > ./schema.json
20      - uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0 # v5
21        with:
22          commit_message: "chore: auto-update generated files"
23          branch: main
24          commit_user_name: actions-user
25          commit_user_email: actions@github.com
26          commit_author: actions-user <actions@github.com>