From ec00a1db30d8e9b2d7e99da395ffadc2829a1608 Mon Sep 17 00:00:00 2001 From: vbem Date: Fri, 6 Oct 2023 16:54:41 +0800 Subject: [PATCH] update --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 746dd96..40ea2a3 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ Options: --user Linux local username of runner --labels Extra labels for the runner --token Runner registration token, takes precedence over MR_GITHUB_PAT + --dotenv The lines to set in runner's '.env' files -h --help Show this help. ``` @@ -136,7 +137,7 @@ runs-on: [self-hosted, ${{ github.repository }}] ### Set environment variables into runners process As described in GitHub official document, there's an approach to [inject environment variables into runners process](https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/using-a-proxy-server-with-self-hosted-runners#using-a-env-file-to-set-the-proxy-configuration) via the `.env` file before configuring or starting the self-hosted runners. This can be achieved via the `--dotenv` option, for example: ```bash -./mr.bash add --org --repo --dotenv 'TZ=Asia/Shanghai' --dotenv 'PATH=\$PATH:/mybin' +./mr.bash add --org --repo --dotenv 'TZ=Asia/Shanghai' --dotenv 'PATH=\$PATH:/mybin' ``` Then the following lines will be added to `.env` file located in self-hosted runner's directory before its configuring and starting: ```plain