I'm trying to set a env var in my app tied to ${{RAILWAY_GIT_COMMIT_SHA}} but it doesn't resolve
purduemike
PROOP

2 years ago

Trying to set a variable to ${{RAILWAYGITCOMMIT_SHA}} but this variable doesn't resolve. My deployment originates from a github trigger

13 Replies

purduemike
PROOP

2 years ago

n/a


2 years ago

that is a dynamic variable that would only be available during runtime, it's not available to be referenced


purduemike
PROOP

2 years ago

does runtime include build time?


purduemike
PROOP

2 years ago

meaning accessible during build


2 years ago

nixpacks or Dockerfile?


purduemike
PROOP

2 years ago

dockerfile


2 years ago

then it would be available during the build as long as you do ARG RAILWAY_GIT_COMMIT_SHA


purduemike
PROOP

2 years ago

That worked perfectly


purduemike
PROOP

2 years ago

ARG RAILWAYGITCOMMITSHA ENV RAILWAYGITCOMMITSHA=${RAILWAYGITCOMMIT_SHA}


purduemike
PROOP

2 years ago

then set another var with it


2 years ago

you don't need that ENV line


2 years ago

you're assigning the same variable to the same variable


purduemike
PROOP

2 years ago

Ah, you are right!


Loading...