Run go generate #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Run go generate | |
| on: | |
| workflow_dispatch: {} | |
| schedule: | |
| - cron: "0 0 * * 1" # Monday 12 AM UTC | |
| permissions: read-all | |
| jobs: | |
| go-generate: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Setup Go | |
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6 | |
| with: | |
| go-version: "1.25.7" | |
| - name: Run go generate | |
| run: go generate ./... | |
| - name: Check if there are uncommitted file changes | |
| run: | | |
| clean=$(git status --porcelain) | |
| if [[ -z "$clean" ]]; then | |
| echo "Empty git status --porcelain: $clean" | |
| else | |
| echo "Uncommitted file changes detected: $clean" | |
| git diff | |
| fi | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8 | |
| with: | |
| branch: sync-go-generate | |
| commit-message: "chore: sync go generated output" | |
| signoff: true | |
| title: "chore: sync go generated output" | |
| body: |- | |
| Results from running `go generate ./...` |