Skip to content
This repository was archived by the owner on Nov 26, 2024. It is now read-only.

Commit f9a4892

Browse files
Zack StevensZack Stevens
andauthored
fix: Add support for generating python grpc protobufs (#2)
Co-authored-by: Zack Stevens <[email protected]>
1 parent a195db3 commit f9a4892

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

action.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,26 @@ inputs:
55
description: Working directory
66
required: false
77
default: ${{ github.workspace }}
8+
python-version:
9+
description: Python version to compile python protos against
10+
required: false
11+
default: '3.10.x'
812
runs:
913
using: composite
1014
steps:
1115
- name: Install Buf
1216
uses: bufbuild/[email protected]
1317
with:
14-
version: '1.0.0-rc8'
18+
github_token: ${{ github.token }}
19+
version: '1.0.0-rc12'
1520
- name: Install Go
1621
uses: actions/setup-go@v2
1722
with:
1823
go-version: 1.17
24+
- name: Setup python
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: ${{ inputs.python-version }}
1928
- name: Setup cache
2029
uses: actions/cache@v2
2130
with:
@@ -41,6 +50,11 @@ runs:
4150
shell: bash
4251
run: |
4352
npm install grpc-tools grpc_tools_node_protoc_ts --global
53+
- name: Install python dependencies # We use betterproto https://github.com/danielgtaylor/python-betterproto to generate python grpc code, so we have to install it
54+
shell: bash
55+
run: |
56+
pip install "betterproto[compiler]"
57+
pip install betterproto
4458
- name: Run buf generate
4559
shell: bash
4660
working-directory: ${{ inputs.working-directory }}

0 commit comments

Comments
 (0)