Build Environement Variable
Closed this issue · 3 comments
Is it possible to pass the current build environment to the Docker
file as ENV variable?
At moment we pass only the $PROJECT_NAME
to it.
Yes, this is possible but requires updating the github workflows (https://github.com/dreipol/github-actions/blob/master/build/entrypoint.sh). and the github workflow file in the templates.
may I ask, what you are using the new env variable for?
It may interfere with our caching mechanisms: We tried to make the builds as similar as possible in order to profit from caching. Thus stage and prod builds might be exactly the same. Introducing a build env variable, that changes the build results depending on which branch you deploy from would nullify the caching efforts.
But maybe its easier for me to understand, when you explain me what you are trying to accomplish.
@philipplaeubli we want to build storybook only when a PR gets merged on stage/master. We would like to avoid building storybook for each commit on a feature branch