diff --git a/python-packages/pylint.yml b/python-packages/pylint.yml
index 622c7fe2f3bffc8834d6adce3c11fb8b9bcacae5..e09355244d6273c582abd4e89b4974a03aeef5bd 100644
--- a/python-packages/pylint.yml
+++ b/python-packages/pylint.yml
@@ -12,6 +12,12 @@ pylint:
     - PYLINT_SCORE=$(sed -n 's/^Your code has been rated at \([-0-9.]*\)\/.*/\1/p' ./pylint/pylint.log)
     - anybadge --label=Pylint --file=pylint/pylint.svg --value=$PYLINT_SCORE 2=red 4=orange 8=yellow 10=green
     - echo "Pylint score is $PYLINT_SCORE"
+  only:
+    refs:
+    # run only when new tag is published or changes pushed to master
+    - tags
+    - master
+
   artifacts:
     paths:
       - ./pylint/