Setting env var for PR envs
jakobzach
HOBBYOP

3 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

3 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!


3 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 3 months ago


Railway
BOT

3 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 3 months ago


Loading...