Actions: Update protobufs using the triggering branch (#10612)
This commit is contained in:
@@ -16,9 +16,14 @@ jobs:
|
|||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Update submodule
|
- 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: |
|
run: |
|
||||||
git submodule update --remote protobufs
|
git fetch --prune origin $GIT_BRANCH
|
||||||
|
git checkout origin/$GIT_BRANCH
|
||||||
|
|
||||||
- name: Download nanopb
|
- name: Download nanopb
|
||||||
run: |
|
run: |
|
||||||
@@ -33,7 +38,7 @@ jobs:
|
|||||||
- name: Create pull request
|
- name: Create pull request
|
||||||
uses: peter-evans/create-pull-request@v8
|
uses: peter-evans/create-pull-request@v8
|
||||||
with:
|
with:
|
||||||
branch: create-pull-request/update-protobufs
|
branch: create-pull-request/update-protobufs-${{ github.ref_name }}
|
||||||
labels: submodules
|
labels: submodules
|
||||||
title: Update protobufs and classes
|
title: Update protobufs and classes
|
||||||
commit-message: Update protobufs
|
commit-message: Update protobufs
|
||||||
|
|||||||
Reference in New Issue
Block a user