I have a setup of multiple repos changing one central repo content by using their pipelines. The pipelines clone this central repo, change it and then push the change back to it.
The issue that's happening is when first repo is changing the central repo, some other repo pushes the commit to it. This causes first repo's push to fail as the main branch is moved.
Even if every repo takes a pull before pushing the change back, the same scenario can still happen.
What's the best way to handle this type of setup using bitbucket pipelines ? Is there a way to lock the central repo or a way to automerge during git push ?