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

When creating an action, how do you set the environment variables for the container? #5492

Open
kh3654po opened this issue Jul 16, 2024 · 1 comment

Comments

@kh3654po
Copy link

I am creating an action using Rust, and I found /bin/compile.py in the default image used by OpenWhisk, which is openwhisk/action-rust-v1.34:nightly. Upon inspecting the code, I noticed that the RELEASE environment variable must be set in os.environ for the compile option to use the release build. However, I don't know how to set this environment variable.

def build(tgt_dir):
     # support RELEASE
     cmd = ["cargo", "build"]
     bin_dir = "debug"
     if "RELEASE" in os.environ:
         cmd += "--release"
         bin_dir = "release"

How do I set this environment variable?

@sciabarracom
Copy link
Contributor

sciabarracom commented Jul 16, 2024 via email

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