-
-
Notifications
You must be signed in to change notification settings - Fork 5
62 lines (51 loc) · 1.72 KB
/
buf.yml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: "proto"
on: push
jobs:
proto-lint:
runs-on: ubuntu-latest
name: "Buf: Lint"
steps:
# 1: Pull code.
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # renovate: tag=v2
# 2: Setup Buf.
- uses: bufbuild/[email protected]
with:
github_token: ${{ github.token }}
# 3: Run linter.
- uses: bufbuild/buf-lint-action@v1
proto-breaking:
runs-on: ubuntu-latest
name: "Buf: Break Detector"
steps:
# 1: Pull code.
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # renovate: tag=v2
# 2: Setup Buf.
- uses: bufbuild/[email protected]
with:
github_token: ${{ github.token }}
# 3: Run break detector.
- uses: elide-tools/buf-breaking-action@46946d7bae1edc0758ffecb6087176e7590c6488
env:
BUF_INPUT_HTTPS_USERNAME: ${{ github.actor }}
BUF_INPUT_HTTPS_PASSWORD: ${{ github.token }}
with:
against: 'https://github.com/OpenCannabis/Specification.git#branch=dev'
buf_token: ${{ secrets.BUF_TOKEN }}
buf_input_https_username: ${{ github.actor }}
buf_input_https_password: ${{ github.token }}
proto-push:
runs-on: ubuntu-latest
name: "Buf: Push"
needs: [proto-lint, proto-breaking]
steps:
# 1: Pull code.
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # renovate: tag=v2
# 2: Setup Buf.
- uses: bufbuild/[email protected]
with:
github_token: ${{ github.token }}
# 3: Push to BSR.
- name: 'Model: Push to BSR'
uses: bufbuild/buf-push-action@v1
with:
buf_token: ${{ secrets.BUF_TOKEN }}