2021-06-18 17:57:02 +02:00
|
|
|
name: Update protobuf generated files
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2021-06-30 18:08:56 +02:00
|
|
|
branches: [main]
|
2021-08-03 05:29:27 +02:00
|
|
|
workflow_dispatch:
|
2021-06-18 17:57:02 +02:00
|
|
|
|
|
|
|
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: |
|
2021-06-21 21:28:43 +02:00
|
|
|
if ! git diff --quiet; then
|
2021-06-18 17:57:02 +02:00
|
|
|
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
|