Build submodule on new submodule ref?

Hi everybody,

consider the following scenario:
I have a meta-repository with git submodule links to other repositories, some on, others elsewhere. Each submodule has their own versioning, and I check out the latest tag of each submodule once I reviewed the new version. In other words, the only commits I make to the meta-repository are updates to submodule refs.

Now, I want to trigger a CI build for each submodule that gets updated to a new version. Since I can’t force each submodule maintainer to include a .gitlab-ci.yml in their repo, I’m trying to figure out the best way to handle this through the submodule ref commits to the meta-repository.

So the ideal workflow would be:

Submodule maintainer updates their repo, adds new tag
=> I review the latest code and check out the submodule @ the new tag
=> I commit & push the changed submodule ref in my meta-repo
=> CI builds the submodule

If it helps: I can use the same CI script across all submodules, just need to have their name and their current git-tag available since the build should be a ZIP file named $submodule_name-$

Any advice on how to achieve this? There must be a better way than to build all submodules on each commit, regardless of whether they were actually updated :slight_smile: