From 202699239fca94e8a3804e46bd42afc3a22bd5c6 Mon Sep 17 00:00:00 2001 From: Jason Murray Date: Sat, 21 Sep 2024 07:37:37 -0700 Subject: [PATCH] feat: trigger class update when protobufs are changed --- .github/workflows/update_protobufs.yml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/update_protobufs.yml b/.github/workflows/update_protobufs.yml index f93930a83..466767273 100644 --- a/.github/workflows/update_protobufs.yml +++ b/.github/workflows/update_protobufs.yml @@ -1,5 +1,10 @@ -name: "Update protobufs and regenerate classes" -on: workflow_dispatch +name: Update protobufs and regenerate classes +on: + pull_request: + branches: + - master + paths: + - meshtastic/** jobs: update-protobufs: @@ -11,10 +16,6 @@ jobs: with: submodules: true - - name: Update submodule - run: | - git submodule update --remote protobufs - - name: Download nanopb run: | wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.8-linux-x86.tar.gz @@ -25,10 +26,11 @@ jobs: run: | ./bin/regen-protos.sh - - name: Create pull request - uses: peter-evans/create-pull-request@v7 + - name: Commit changes + uses: EndBug/add-and-commit@v9 with: - title: Update protobufs and classes - add-paths: | - protobufs - src/mesh + add: src/mesh + author_name: CI Bot + author_email: meshtastic-ci-bot@users.noreply.github.com + default_author: github_actor + message: Update classes from protobugs