Skip to content

feat(CI): suppress generated files in PR diffs #6

feat(CI): suppress generated files in PR diffs

feat(CI): suppress generated files in PR diffs #6

Workflow file for this run

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/buf@v1.30.0
echo "Installing golangci-lint..."
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55
echo "Installing protoc-gen-doc..."
go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@v1.5.1
echo "Dependencies installed. Running code & docs generation..."
make proto-generate
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "generated"
# git push