pass env vars to all actions

Avatar

Avatar

ursboller

MVP

Total Posts

1.0K

Likes

485

Correct Answer

250

Avatar

ursboller

MVP

Total Posts

1.0K

Likes

485

Correct Answer

250
ursboller
MVP

27-09-2020

I have some .env variables I want to pass to all actions. Until now, I added the variables in question as params to all actions in the manifest.yml file. but too often I changed something and forgotten to change the manifest as well.

question: is there a way to have "real env variables", without adding them to all actions? I tried to use env vars starting with "__OW_" but that was not a success...

any hints hiw to do that?

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar

duypnguyen

Employee

Avatar

duypnguyen

Employee

duypnguyen
Employee

14-10-2020

Hi @ursboller  - I just recall a way to share the variables across your actions without repeating it in the manifest per action.

Because all actions are placed under the `__APP_PACKAGE__`, you could also set the default params of the package. Then you are able to get them in each action, just in the same manner as setting default params per action.

This is not yet part of the manifest.yaml definition, but you could use the CLI, e.g. `aio runtime package update sample-app-0.0.1 --param name "Firefly"`.