Skip to content

Merge pull request #131 from pollen-robotics/18-automatically-generat… #6

Merge pull request #131 from pollen-robotics/18-automatically-generat…

Merge pull request #131 from pollen-robotics/18-automatically-generat… #6

name: Generate Protobuf Python Code
on: [push]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install grpcio-tools==1.59.3 mypy-protobuf==3.5.0
- name: Generate Protobuf Python Code
run: |
python -m grpc_tools.protoc -I./protos --python_out=./python/reachy2_sdk_api --grpc_python_out=./python/reachy2_sdk_api --mypy_out=./python/reachy2_sdk_api --mypy_grpc_out=./python/reachy2_sdk_api ./protos/*.proto
- name: Commit and push changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "Generated Protobuf Python Code" || echo "No changes to commit"
git push