[SOLVED] Using conditions with plugins/gcr and tags

Does plugins/gcr support conditions?
When I add conditions, the gcr step disappear…
image

Part of my .drone.yml setting :
gcr:
image: plugins/gcr
registry: asia.gcr.io
repo: …
dockerfile: ./drone/Dockerfile_server
tags: ${DRONE_TAG}
json_key: …
when:
branch: master

Conditions exist at the drone core level, not at the plugin level. The reason that drone is (correctly) skipping the step is because you are using a branch condition for a tag event. Tags are a pointer to a commit sha, not a branch [1]. If you want to limit a step to a tag, you should use the following syntax:

when:
  event: tag

[1] https://stackoverflow.com/questions/12754078/how-to-get-the-branch-from-tag-name-in-git