Docker plugin only push tags

Hello I’m trying to figure out how to push an image only if there is a release tag. In other words I want to run the docker build every commit to master but only want to push the image to the registry on certain events, how might I accomplish this? I’m sure it’s very simple but I can’t find it in the docs.

kind: pipeline
name: ci
type: kubernetes
steps:
- name: build_and_push
  image: plugins/docker
  settings:
    dockerfile: docker/7.4/Dockerfile
    build_args:
      - WWW_GROUP=www-data
    auto_tag: true
    auto_tag_suffix: ubuntu20.04-amd64-php7.4
    registry: harbor-harbor-registry.harbor.svc.cluster.local:5000
    insecure: true
    username:
      from_secret: HARBOR_USER
    password:
      from_secret: HARBOR_PASS
    repo: harbor-harbor-registry.harbor.svc.cluster.local:5000/project/repo

Drone supports conditional steps (e.g. only execute this step if the event type is tag). See https://docs.drone.io/pipeline/docker/syntax/conditions/