Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment variables are passed only to first command in script #166

Open
gtirloni opened this issue Jul 4, 2022 · 1 comment
Open

Comments

@gtirloni
Copy link

gtirloni commented Jul 4, 2022

  • This action defines the input script which is a single string (attempting to pass a list of commands results in error)
  • When multiple commands are chained with cmd1 && cmd2 they are passed to the container in the INPUT_SCRIPT environment variable
  • The drone-ssh plugin reads the INPUT_SCRIPT env var into the script.string which is described as execute single commands for github action
  • All the environment variable passed to drone-ssh are concatenated and appended to the begining of the command that will be executed, resulting in ENV1=VAL1 ENV2=VAL2 cmd1 && cmd2
  • cmd2 does not get the environment variables added to its environment
@OmarSRolo
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants