Skip to content

Uber mock, update golangci-lint (#23) #129

Uber mock, update golangci-lint (#23)

Uber mock, update golangci-lint (#23) #129

Workflow file for this run

name: buf
on:
push:
branches: [ main ]
pull_request:
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: bufbuild/buf-setup-action@v1
- uses: bufbuild/buf-lint-action@v1
with:
input: 'proto'
# We need to fetch main so we can compare breaking changes against whatever is in main right now.
- name: Fetch origin/main
run: git fetch --no-tags --prune --depth=1 origin +refs/heads/main:refs/remotes/origin/main
- uses: bufbuild/buf-breaking-action@v1
with:
input: 'proto'
against: '.git#branch=origin/main,subdir=proto'
# Push buf module to the buf schema registry, but only if the validate action succeeded and if the action is running
# on branch main.
push:
runs-on: ubuntu-latest
needs: validate
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v3
- uses: bufbuild/buf-setup-action@v1
- uses: bufbuild/buf-push-action@v1
with:
input: 'proto'
buf_token: ${{ secrets.BUF_TOKEN }}