Add only for build and test jobs
Adds an only specification for the gitlab CI jobs. This only overrides the default only. This was necessary because merge trains currently contained no jobs. (https://gitlab.com/gitlab-org/gitlab-foss/-/issues/55699).