name: Build protos on: pull_request: branches: - main types: - opened - synchronize - reopened - edited push: tags: - 'v*.*.*' jobs: build: name: Build Protobufs runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v7 with: fetch-depth: 0 - name: Set up Go uses: actions/setup-go@v7 with: go-version: '1.27' - name: Install protoc run: | sudo apt-get update sudo apt-get install -y protobuf-compiler - name: Install protoc-gen-go run: | go install google.golang.org/protobuf/cmd/protoc-gen-go@latest - name: Generate Protobufs run: | make proto - name: Add changes to git run: | git config --global user.name "actions[bot]" git config --global user.email "noreply@beejay.kim" git add . git diff --cached --exit-code || (git commit -m "Update generated protobufs" && git push)