-
Notifications
You must be signed in to change notification settings - Fork 213
59 lines (49 loc) · 1.28 KB
/
proto.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
name: Proto
on:
push:
branches:
- main
paths:
- "sdk/**"
- "rpc/**"
pull_request:
paths:
- "sdk/**"
- "rpc/**"
env:
GO_VERSION: "1.23"
jobs:
proto-lint:
name: "Lint Protos"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1.26.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: bufbuild/buf-lint-action@v1
with:
input: "rpc/flipt"
- uses: bufbuild/buf-breaking-action@v1
with:
input: "rpc/flipt"
against: "https://github.com/${GITHUB_REPOSITORY}.git#branch=main"
proto-check:
name: "Check Generated Code"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
cache: true
- uses: bufbuild/buf-setup-action@v1.26.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: magefile/mage-action@v3
with:
version: latest
args: proto
- name: Ensure clean git state.
run: git diff --quiet --exit-code sdk/ rpc/ || (echo "Please run 'mage proto' and commit changes." && exit 1)