Skip to content

buf

buf #316

Workflow file for this run

name: buf
on:
push:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install
uses: actions/setup-go@v5
with:
go-version: 1.21.x
- name: cache
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-registry-proto-ci-${{ hashFiles('**/Makefile') }}
restore-keys: ${{ runner.os }}-registry-proto-ci-
- name: Lint
run: |
make lint
breaking:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1
- uses: bufbuild/buf-breaking-action@v1
with:
against: buf.build/bufbuild/registry
push:
environment: production
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs:
- lint
- breaking
steps:
- uses: actions/checkout@v4
- name: Install buf cli
uses: bufbuild/buf-setup-action@v1
with:
github_token: ${{ github.token }}
- uses: bufbuild/buf-push-action@v1
with:
buf_token: ${{ secrets.BUF_TOKEN }}