self-hosted not using bashrc #25407
-
I can source it, but by default nothing from bashrc is loaded into the runtime at launch. Should I update a different file instead bashrc? We have several additions to our base image to support multiple engineering workflows and dependencies, including a rather lengthy PATH. I’ve suggested people source bashrc, but typically this is something that is expected in the linux world that when you have a shell, the environment loads with any configurations. Is there any plan to automatically source bashrc? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
Hi @everops-alex , Currently Github Actions invoke bash scripts in non-interactive mode, it will not load .bashrc by default. >> Is there any plan to automatically source bashrc? I would recommend you submiting this requirement in the Feedback form for GitHub Actions. |
Beta Was this translation helpful? Give feedback.
-
You can use custom shell, @everops-alex: https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#custom-shell For example, the template of “bash” shell is:
So to make it source the rc files before running the script, you can use (-l flag is needed to invoke bash as login shell, see “Invocation” section in bash’s man page for more info):
_Edited: _I used -I instead of -l in the reply |
Beta Was this translation helpful? Give feedback.
-
Is it possible to set this for the whole workflow? |
Beta Was this translation helpful? Give feedback.
-
You could use
|
Beta Was this translation helpful? Give feedback.
You can use custom shell, @everops-alex:
https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#custom-shell
For example, the template of “bash” shell is:
So to make it source the rc files before running the script, you can use (-l flag is needed to invoke bash as login shell, see “Invocation” section in bash’s man page for more info):
_Edited: _I used -I instead of -l in the reply