-
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@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
egress-policy: audit
- name: "Setup: Checkout"
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: "Setup: Buf"
uses: bufbuild/buf-setup-action@382440cdb8ec7bc25a68d7b4711163d95f7cc3aa # v1.28.1
with:
github_token: ${{ github.token }}
- name: "Check: Buf Lint"
uses: bufbuild/buf-lint-action@044d13acb1f155179c606aaa2e53aea304d22058 # v1.1.0
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@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
egress-policy: audit
- name: "Setup: Checkout"
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: "Setup: Buf"
uses: bufbuild/buf-setup-action@382440cdb8ec7bc25a68d7b4711163d95f7cc3aa # v1.28.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@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
egress-policy: audit
- name: "Setup: Checkout"
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: "Setup: Buf"
uses: bufbuild/buf-setup-action@382440cdb8ec7bc25a68d7b4711163d95f7cc3aa # v1.28.1
with:
github_token: ${{ github.token }}
- name: "Push: BSR"
uses: bufbuild/buf-push-action@a654ff18effe4641ebea4a4ce242c49800728459 # v1.2.0
with:
buf_token: ${{ secrets.BUF_TOKEN }}
input: proto