How to dynamically set plugin settings parameter?


I’m trying to configure a pipeline that’s is supposed to achieve the following steps:

  • Fetch repo tags,
  • Install dependencies,
  • Perform internal checks (unit tests, lint, and type-checks)
  • Tag the repository with the next available tag (this tag will be used in further steps)
  • Build using the previously generated tag
  • Upload the assets from the build to Google Cloud Storage on a new folder as the previously generated tag. (This is what is causing me issues)

In the step where I tag the repository, I’m writing the new tag value in the “.tags” file so that I can use it later in the pipeline.
In order to upload the assets to Google Cloud Storage, I’m using the “plugins/gcs” image.
Considering the scenario described, is it possible to dynamically set the “target” parameter in the plugin’s settings with the content of the “.tags” file?

Something like this, for example:

- name: upload-gcs
    image: plugins/gcs
      source: build
      target: "my-bucket/$(cat .tags)/"
        from_secret: drone-gcr-access

target property value is not a command, which is executed in a shell, but merely a string, which is interpreted by an interpreter (drone server), that is expanding some patterns, unfortunately using some bash-like syntax.