Skip to content

feat: github action for make generate #1

feat: github action for make generate

feat: github action for make generate #1

Workflow file for this run

name: generate
on: pull_request
jobs:
check-generated:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v3
with:
go-version: '1.22'
- name: make generate
run: make generate
- name: configure git
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: commit and push generated changes
run: |
if [ -n "$(git status --porcelain)" ]; then
git add .
git commit -m "chore: generate via GitHub action"
git push origin HEAD:${{ github.head_ref }}
fi