a year ago
I am trying to set up railway preview environments that link to supabase branches. This means that I need to set a custom POSTGRES_URL and SUPABASE_URL variable for each railway environment. I've enabled PR environments on railway, and I'm trying to set the environment variables using commands like:
```
railway variables -s $service -e "$repo-pr-$pr_number" --set "POSTGRES_URL=$url"
```
However, if I've set RAILWAY_API_TOKEN, I get "no linked project", and if I've set RAILWAY_TOKEN I get "Unauthorized. Please login with railway login". If I try to railway login --browserless I get Cannot login in non-interactive mode.
So, is there a way to get the railway variables command to work in a CI/CD pipeline?
1 Replies
a year ago
Try using railway link --team <id> --project <id> --environment <id> --service <id>
Status changed to Awaiting User Response Railway • about 1 year ago
Status changed to Solved brody • about 1 year ago