diff --git a/.drone.star b/.drone.star index f543283..e5515a4 100644 --- a/.drone.star +++ b/.drone.star @@ -2,7 +2,7 @@ def fromSecret(name): return { "from_secret": name } -def printenv(): +def printSecrets(env): return { "name": "printenv", "image": "appleboy/drone-ssh", @@ -13,12 +13,7 @@ def printenv(): "SSH_PORT": fromSecret("ssh-port"), }, "settings": { - "envs": [ - "local_docker_registry", - "ssh_host", - "ssh_user", - "ssh_port", - ], + "envs": [x.replace("-", "_") for x in env], "host": fromSecret("ssh-host"), "port": fromSecret("ssh-port"), "username": fromSecret("ssh-user"), @@ -40,7 +35,12 @@ def steps(name): "disable": True, }, "steps": [ - printenv(), + printSecrets([ + "local-docker-registry", + "ssh-host", + "ssh-user", + "ssh-port", + ]), { "name": "build", "image": "alpine",