I have three git repositories: A, B, and C. C is a superproject including submodules A and B, tracking each submodule's respective master branch.
When the master branch of A or B is changed, I must do the following in C:
git submodule update --remote
git add A
git add B
git commit -m "Update submodule A or B"
git push
At this point an automated build and deploy from C is executed.
I'm looking for ways to streamline this process. Ideally, any commit to the master branch of A or B would trigger a hook to update, commit, and push to C. Any ideas how to achieve this?
Edit: In case there's a vendor-specific feature I should be aware of, I'm using Azure DevOps for the git hosting and Azure Pipelines for the build and deploy process.