feat(CI): suppress generated files in PR diffs #6
Workflow file for this run
This file contains 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: 'Generate' | |
on: | |
# push: | |
# branches: | |
# - main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
generate: | |
runs-on: ubuntu-22.04 | |
permissions: | |
checks: write | |
contents: read | |
pull-requests: read | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 | |
with: | |
go-version: '1.21.8' | |
- run: | | |
echo "Installing dependencies and regenerating code & docs from .proto definitions" | |
echo "Installing buf..." | |
GO111MODULE=on go install github.com/bufbuild/buf/cmd/[email protected] | |
echo "Installing golangci-lint..." | |
go install github.com/golangci/golangci-lint/cmd/[email protected] | |
echo "Installing protoc-gen-doc..." | |
go install github.com/pseudomuto/protoc-gen-doc/cmd/[email protected] | |
echo "Dependencies installed. Running code & docs generation..." | |
make proto-generate | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add . | |
git commit -m "generated" | |
# git push |