cicd: fix image building jobs triggering on non-MR pipelines
This is very similar to #166 (closed), so that's required reading. The problem here is that everything that isn't "pipeline for merge requests" has broken changes functionality, often triggering jobs when it shouldn't.
This happened during review of !133 (merged). Where I created a manual pipeline for testing after settings the variables (https://git.mel.vin/template/c/pipelines/2874), which then suddenly wanted to run all image building jobs.
The fix is simple: only check for rules:changes
if the pipeline source is a merge request event. Only then if the rules:changes
mechanism reliable. This also fixes the double image build that currently occurs after a MR changing an image has been merged into master, where it's built again.
As always ENABLE_STAGE_CICD
can still be set to force building of images.