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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
14        with:
15          token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
16      - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
17        with:
18          go-version-file: go.mod
19      - run: go run . schema > ./schema.json
20      - uses: stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3 # 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>