diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c61060c269b18b62a96b82be498a3d561f8ee05c..cecaed0b20302ca72266b1a7879a7fb8c15576e1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,7 +8,7 @@ workflow:
   rules:
     - if: $CI_PIPELINE_SOURCE == "merge_request_event"
     - if: $CI_COMMIT_TAG
-    - if: $CI_PIPELINE_SOURCE == "push"
+    - if: $CI_COMMIT_BRANCH
     
 variables:
 
@@ -20,13 +20,14 @@ stages:
 Build pythonForPandocFilter docker image:
   stage: build
   before_script: cd pandocFilter
-  script: docker build --tag pandocFilter:latest -f dockerfile .
+  script: docker build --tag pandocfilter:latest -f dockerfile .
   rules:
-    - if: $CI_PIPELINE_SOURCE == "push"
+    - if: $CI_COMMIT_BRANCH
       changes:
         - pandocFilter/dockerfile
         - pandocFilter/setup.py
         - pandocFilter/requirements.txt
+        - pandocFilter/pandocFilter.py
 
         
 Word CR text: