I have a merge job in my gitlab ci, which merges two branches at every midnight. Now, this runs fine if there are changes in one branch so deployment job gets triggered. But it doesn't when there no changes. So whenever it runs git push in ci job, I get status code 0. What I require is, to return status code 0 if changes are pushed and staus code 1 if "Everything is upto date".
How can I achive this? Is there any way using shell script or python?
Basically, I want the merge/push job to fail is there are no changes, so on_failure job can trigger.
Thanks.