Accessing secret env variables during build step
I need to pass STROOM_REPOS_ACCESS_KEY into a build step, but it's not defined unless I put it plaintext into nixpacks.toml. However, I don't want to commit this value either
24 Replies
Project ID:
fdd52bdc-3766-40b0-9727-44e1356a5da3
fdd52bdc-3766-40b0-9727-44e1356a5da3
have you tried putting it in the service variables?
do you mean [variables] section in nixpacks?
I mean the variables section of the railway service
what about locally though?
i guess you're right, and that's not a railway feedback, more of a nixpacks feedback
you use
railway run
locally
still isn't feedback, these are purely questionsso you're saying it's not possible to pass a variable into nixpacks build without exposing it plaintext in the nixpacks.toml?
never said that
how do i do that?
you want to put that variable in the service variables
use the service variables
yeah, you said that
this works on railway, but not locally
^
yes, i tried that now
or you just login with github locally and you'd be authorised
what command do you propose to do w/ railway run?
i thought you meant railway run nixpacks build .
A block has been shared!
railway run nixpacks build . ### ╔═════════════════════�...
it doesn't work either
whatever command needs that github token
mm this doesn't really make sense
I'm not sure what's confusing here
so let's only focus on getting this working on railway
have you placed your github token in the service variables yet
yes, it works on railway, but i also want to be able to build the same image for testing locally
the original problem is mostly fixed now, so i will close the issue
but it's still not clear to me why it's not possible