cs3org / cs3apis

:arrows_clockwise: Connect Storage and Application Providers
https://buf.build/cs3org-buf/cs3apis
Apache License 2.0
53 stars 29 forks source link

Updated build pipeline to not fail when there are no changes in the generated mocks #234

Closed jessegeens closed 2 months ago

jessegeens commented 2 months ago

The current pipeline has a bit of code that generates mock files based on the defined interfaces, and then automatically commits them:

mockery
git add .
git commit -m 'Generated mock interfaces for https://github.com/cern-eos/grpc-proto/tree/${{ github.sha }}'
git push origin main

This makes the pipeline fail, because git commit will return a non-zero exit code when there is nothing to commit. This PR solves this issue.