appleboy / drone-scp

Copy files and artifacts via SSH using a binary, docker or Drone CI.
MIT License
141 stars 29 forks source link

Repository env variables are empty #188

Open codewishofficial opened 5 months ago

codewishofficial commented 5 months ago

This works

- name: scp files
  image: appleboy/drone-scp
  settings:
    host: example.com
    username: foo
    password: bar
    port: 22
    target: /var/www/deploy/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}
    source: release.tar.gz

However, if I want to use a repository env secrets it does not work

- name: scp files
  image: appleboy/drone-scp
  environment:
    DOMAIN:
       from_secret: domain
  settings:
    host: example.com
    username: foo
    password: bar
    port: 22
    target: /var/www/deploy/${DRONE_REPO_OWNER}/${DOMAIN}
    source: release.tar.gz

Only this work, but I need to interpolate the repository secret env with other vars as in the example above

- name: scp files
  image: appleboy/drone-scp
  settings:
    host: example.com
    username: foo
    password: bar
    port: 22
    target:
     from_secret: domain
     source: release.tar.gz

Any workaround of this that I am not aware? Thanks.