Setting env var for PR envs
jakobzach
HOBBYOP

6 months ago

Hi,

I'm looking for a way to set env vars for PR environments. The CLI just returns the typical "Unauthorized" error but the same command works just fine for the production deployment.

I've read in a thread from a year ago "we just dont support passing in specific variables for the PR envs".

Is there already a way to somehow make this work with either CLI or GraphQL API?

Thanks!

Command used:

railway variables --service service_id --environment environment_name --set "env_var=value" --skip-deploys

Solved

2 Replies

Railway
BOT

6 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


6 months ago

Hello,

I think you would be looking for this?

https://docs.railway.com/tutorials/github-actions-pr-environment


Status changed to Awaiting User Response Railway 6 months ago


Railway
BOT

5 months ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway 5 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...