From da821ec663341940a2a7935f806d48af6c5a9b97 Mon Sep 17 00:00:00 2001 From: Austin Date: Mon, 8 Jun 2026 15:53:12 -0400 Subject: [PATCH] Actions: Update protobufs using the triggering branch (#10612) --- .github/workflows/update_protobufs.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update_protobufs.yml b/.github/workflows/update_protobufs.yml index d11663ee2..142a4fccc 100644 --- a/.github/workflows/update_protobufs.yml +++ b/.github/workflows/update_protobufs.yml @@ -16,9 +16,14 @@ jobs: submodules: true - name: Update submodule - if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' }} + if: ${{ github.ref_name == 'master' || github.ref_name == 'develop' }} + working-directory: protobufs + env: + # Use the branch that triggered the workflow as the protobuf branch. + GIT_BRANCH: ${{ github.ref_name }} run: | - git submodule update --remote protobufs + git fetch --prune origin $GIT_BRANCH + git checkout origin/$GIT_BRANCH - name: Download nanopb run: | @@ -33,7 +38,7 @@ jobs: - name: Create pull request uses: peter-evans/create-pull-request@v8 with: - branch: create-pull-request/update-protobufs + branch: create-pull-request/update-protobufs-${{ github.ref_name }} labels: submodules title: Update protobufs and classes commit-message: Update protobufs