-
-
Notifications
You must be signed in to change notification settings - Fork 17
106 lines (98 loc) · 2.98 KB
/
model.ci.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Model
on:
push:
branches:
- v3
- main
- stable
pull_request:
types: [labeled, opened, reopened, synchronize]
permissions:
contents: read
jobs:
##
## Job: Buf Lint
##
buf-lint:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
permissions:
contents: "read"
steps:
- name: Harden Runner
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
with:
egress-policy: audit
- name: "Setup: Checkout"
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- name: "Setup: Buf"
uses: bufbuild/buf-setup-action@eb60cd0de4f14f1f57cf346916b8cd69a9e7ed0b # v1.26.1
with:
github_token: ${{ github.token }}
- name: "Check: Buf Lint"
uses: bufbuild/buf-lint-action@bd48f53224baaaf0fc55de9a913e7680ca6dbea4 # v1.0.3
with:
input: proto
##
## Job: Buf Breaking
##
buf-breaking:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
permissions:
contents: "read"
continue-on-error: ${{ contains(github.event.pull_request.labels.*.name, 'ci:buf-breaking-ignore') }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
with:
egress-policy: audit
- name: "Setup: Checkout"
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- name: "Setup: Buf"
uses: bufbuild/buf-setup-action@eb60cd0de4f14f1f57cf346916b8cd69a9e7ed0b # v1.26.1
with:
github_token: ${{ github.token }}
- name: "Check: Buf Breaking"
uses: bufbuild/buf-breaking-action@a074e988ee34efcd4927079e79c611f428354c01 # v1.1.3
continue-on-error: ${{ contains(github.event.pull_request.labels.*.name, 'ci:buf-breaking-ignore') }}
with:
against: https://github.com/elide-dev/v3.git#branch=v3
input: proto
##
## Job: Buf Push
##
buf-push:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
needs: ["buf-lint", "buf-breaking"]
if: |
(
github.ref == 'refs/heads/stable' ||
github.ref == 'refs/heads/v3' ||
startsWith(github.ref, 'refs/tags/v')
)
permissions:
contents: "read"
steps:
- name: Harden Runner
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
with:
egress-policy: audit
- name: "Setup: Checkout"
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- name: "Setup: Buf"
uses: bufbuild/buf-setup-action@eb60cd0de4f14f1f57cf346916b8cd69a9e7ed0b # v1.26.1
with:
github_token: ${{ github.token }}
- name: "Push: BSR"
uses: bufbuild/buf-push-action@1c45f6a21ec277ee4c1fa2772e49b9541ea17f38 # v1.1.1
with:
buf_token: ${{ secrets.BUF_TOKEN }}
input: proto