R
Railway•13mo ago
Javyer

How to set the commit sha as a environment variable?

Hi! Good day! I'm currently trying to link the reports from Sentry with the Git commit's SHA. For this, I'm setting a variable with the value: ${{RAILWAY_GIT_COMMIT_SHA}} but it is empty. I also tried to use ${{RAILWAY_DEPLOYMENT_ID}} but it also looks empty. Am I missing something in my configuration? I'm properly using other variables to link to my other services.
5 Replies
Percy
Percy•13mo ago
Project ID: f42f9b1a-db98-42a2-ac6d-5c2ab7b7be41
Javyer
JavyerOP•13mo ago
f42f9b1a-db98-42a2-ac6d-5c2ab7b7be41
Brody
Brody•13mo ago
https://docs.railway.app/develop/variables#railway-provided-variables the variables you speak of are automatically available during build / runtime, you do not need to (and should not) set them yourself
Javyer
JavyerOP•13mo ago
Oh I see that I can simply access to them. Is there any way to assign them to a different variable (without using a Docker image). I'm using SvelteKit and I can't access variables that don't start with the PUBLIC_ prefix 😦
Brody
Brody•13mo ago
the two you mentioned, no, youd have to have a pre-run script that re-exports them with the names you need
Want results from more Discord servers?
Add your server