name: Check protos are up to date
on:
- push
- pull_request
env:
PROTOBUF_VERSION: "33.0"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
- name: Install Protoc
run: |
wget https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOBUF_VERSION/protoc-$PROTOBUF_VERSION-linux-x86_64.zip
sudo unzip protoc-$PROTOBUF_VERSION-linux-x86_64.zip -d /usr/local
rm protoc-$PROTOBUF_VERSION-linux-x86_64.zip
- name: Run proto generation script
run: sh resources/scripts/protoc.sh
- name: Check for changes
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "Protos are not up to date. Please run the proto generation script.";
git status
exit 1;
else
echo "Protos are up to date.";
fi