Use secret inside script

I set up the target directory for rsync in a secret and would like to use the path in a script afterwards:

- name: rsync
  image: drillster/drone-rsync
      from_secret: remote_target
      - bash ${remote_target}/

It obviously does not work this way in Drone though, as the secret does not seem to be an environment variable. Is there a way to use secrets other than the from_secret: remote_target way?


As mentioned in doc could you please try to construct the variable in command section
“Also note the environment section cannot expand environment variables or evaluate shell expressions. If you need to construct variables it should be done in the commands section”