gitlab-ci: Only trigger test-docs job automatically for MRs
authorMichel Dänzer <mdaenzer@redhat.com>
Wed, 15 Jul 2020 08:59:54 +0000 (10:59 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 17 Jul 2020 10:25:54 +0000 (10:25 +0000)
Follow-up to
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5898 .

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5918>

.gitlab-ci.yml

index 45fac9f..594cadb 100644 (file)
@@ -69,7 +69,7 @@ test-docs:
     - *ignore_scheduled_pipelines
     - if: '$CI_PROJECT_NAMESPACE == "mesa"'
       when: never
-    - if: '$GITLAB_USER_LOGIN == "marge-bot"'
+    - if: '$GITLAB_USER_LOGIN == "marge-bot" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
       changes: *docs-or-ci
       when: on_success
     - changes: *docs-or-ci