Use rules instead of only
As only is a candidate for deprecation in gitlab-ci script
Gitlab will go into maintenance on Wednesday 6th December between 8:00am - 10:30am for applying a GitLab Security Release Update
As only is a candidate for deprecation in gitlab-ci script