-
Notifications
You must be signed in to change notification settings - Fork 10
52 lines (50 loc) · 1.49 KB
/
buf-push.yml
File metadata and controls
52 lines (50 loc) · 1.49 KB
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
name: Push to buf.build
on:
push:
branches:
- main
paths:
- "proto/**"
workflow_dispatch:
jobs:
push:
runs-on: ubuntu-latest
environment:
name: buf.build
steps:
- uses: actions/checkout@v3
- uses: bufbuild/buf-setup-action@v1
- uses: bufbuild/buf-push-action@v1
with:
input: 'proto'
buf_token: ${{ secrets.BUF_BUILD_TOKEN }}
compile_proto:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ^1.16
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install protobuf plugins
run: |
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
pip install -r ./devops/requirements.txt
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: Compile proto files
run: |
git checkout -b update-protobuf-generated-files
git config --global user.name 'Github Action Runner'
git config --global user.email 'trinsic.github.bot@users.noreply.github.com'
python ./devops/generate_proto_files.py
git add .
git commit -m "Proto file changes"
git push --set-upstream origin update-protobuf-generated-files