3 months ago
I would like to add a seed file to populate my datebase for testing.
I would however only want to do this if it is a PR build
How can I check if the current build is a PR build.
A dirty hack is the check the url and see if it is staging or production and if not , it means it is Pr but it is a abit hacky.
I thought about how railway generates the urls and if there is "{accountname}-pr-{number}" . But that is also a bit hacky.
What is a better way >
I tough about using
GITHUB_EVENT_NAME: ${{ github.event_name }}
GITHUB_REF: ${{ github.ref }}
to check to see if they are PR builds but we do not have yaml files in RAILWAY as far as I know.
Thanks
1 Replies
3 months ago
Hello,
https://docs.railway.com/reference/variables#railway-provided-variables
You can check RAILWAY_ENVIRONMENT_NAME
Status changed to Awaiting User Response railway[bot] • 3 months ago
Status changed to Solved brody • 3 months ago