-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (45 loc) · 1.13 KB
/
buf.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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 }}