Use "rules" instead of "only"
"rules" are recommended over "only" by gitlab CI should also only be triggered for merge requests and pushs to master