mirror of
https://github.com/esphome/aioesphomeapi.git
synced 2024-12-03 13:53:21 +01:00
37 lines
1.0 KiB
YAML
37 lines
1.0 KiB
YAML
name: Update protobuf generated files
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
protoc-update:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.7'
|
|
- name: Install protoc
|
|
run: |
|
|
sudo apt-get install protobuf-compiler
|
|
- name: Set up Python environment
|
|
run: |
|
|
pip3 install -e .
|
|
pip3 install -r requirements_test.txt
|
|
|
|
- name: Generate protoc
|
|
run: |
|
|
script/gen-protoc
|
|
# github actions email from here: https://github.community/t/github-actions-bot-email-address/17204
|
|
- name: Commit changes
|
|
run: |
|
|
if ! git diff --quiet; then
|
|
git config --global user.name "github-actions[bot]"
|
|
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git commit -am "Update protobuf files"
|
|
git push
|
|
fi
|