Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
vbem committed Oct 6, 2023
1 parent dd2f9a2 commit ec00a1d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
```

Expand Down Expand Up @@ -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 <ORG-NAME> --repo <REPO-NAME> --dotenv 'TZ=Asia/Shanghai' --dotenv 'PATH=\$PATH:/mybin'
./mr.bash add --org <ORG> --repo <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
Expand Down

0 comments on commit ec00a1d

Please sign in to comment.