Skip to content

Update Proto

Update Proto #134

Workflow file for this run

name: "Update Proto"
on:
workflow_dispatch:
inputs:
commit_author:
description: "Commit author username"
required: true
commit_author_email:
description: "Commit author email"
required: true
commit_message:
description: "Commit message"
required: true
jobs:
sync:
name: "Update proto"
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
persist-credentials: false
- uses: actions/setup-go@v2
with:
go-version: "1.20"
- uses: arduino/setup-protoc@v1
with:
version: "3.x"
- name: Re-build proto
run: |
make install update-proto test
- name: Commit update
env:
GIT_AUTHOR_NAME: ${{ github.event.inputs.commit_author }}
GIT_AUTHOR_EMAIL: ${{ github.event.inputs.commit_author_email }}
GIT_COMMITTER_NAME: ${{ github.event.inputs.commit_author }}
GIT_COMMITTER_EMAIL: ${{ github.event.inputs.commit_author_email }}
run: |
git remote set-url origin https://x-access-token:${{ secrets.COMMANDER_DATA_TOKEN }}@github.com/${{ github.repository }}
git add .
git commit -m "${{ github.event.inputs.commit_message }}"
if [ $? -eq 0 ]; then
git push
else
echo "No changes to commit"
fi