You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-1Lines changed: 23 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,8 @@ Environment variables:
27
27
MR_GITHUB_API_BASEURL=https://api.github.com
28
28
MR_RELEASE_URL=<latest on github.com/actions/runner/releases>
29
29
MR_USER_BASE=<default in /etc/default/useradd>
30
-
MR_GITHUB_PAT=***
30
+
MR_USER_PREFIX=runner-
31
+
MR_GITHUB_PAT=ghp_***
31
32
32
33
Sub-commands:
33
34
add Add one self-hosted runner on this host
@@ -185,3 +186,24 @@ TZ=Asia/Shanghai
185
186
PATH=$PATH:/mybin
186
187
all_proxy=socks5h://localhost:1080
187
188
```
189
+
190
+
### Inject hook script before starting the runner service
191
+
192
+
This application also supports to inject a hook script before starting the [runner service](https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/configuring-the-self-hosted-runner-application-as-a-service) via `MR_CMD_SVC_PRE_START` environment variable.
193
+
194
+
For example, you can limit the CPU and RAM usage of the runner service by modifying the unit file of the runner service. Add the following lines to the `.env` file under the directory of this application. Then this script will be executed just before starting the runner service - `./svc.sh start`.
195
+
196
+
```bash
197
+
MR_CMD_SVC_PRE_START="$(cat <<-'__HEREDOC__'
198
+
echo "🚀 Running custom commands before starting runner service."
0 commit comments