ci: Restrict "success" job to pipelines for MRs

Expected benefits:

* No more spurious non-MR pipelines with just this job.
* No more warnings from GitLab such as on
  https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/195778

Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6492>
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 35593d7..3fea645 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -126,7 +126,8 @@
       when: never
     - changes: *all_paths
       when: never
-    - when: on_success
+    - if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
+      when: on_success
   variables:
     GIT_STRATEGY: none
   script: