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
feat(docker): enhance GitHub runner configuration and documentation
- Added support for dynamic runner names using environment variable expansion.
- Updated README with examples of configuring Docker containers and environment variables.
- Improved the safety of running configuration commands in entrypoint script by using array arguments instead of eval.
- Added gettext-base package to Dockerfile for environment variable substitution capabilities.
GITHUB_RUNNER_NAME: 'runner-$HOSTNAME'# Will be "runner-worker-node-1"
114
+
```
115
+
116
+
**Examples of Supported Variables:**
117
+
-`$HOSTNAME` or `${HOSTNAME}` - The container's hostname (container ID by default in Docker)
118
+
-`$USER` or `${USER}` - The current user (typically "runner")
119
+
-`$HOME` or `${HOME}` - The user's home directory
120
+
-`$PATH` - System PATH
121
+
- Any custom environment variable you define
122
+
123
+
**Note:** Use single quotes (`'`) to prevent variable expansion on the host shell, allowing expansion inside the container. Variable expansion is performed safely using `envsubst`, preventing code injection.
124
+
85
125
In ephemeral mode, the runner will:
86
126
- Process only one job and then automatically deregister
87
127
- Provide a clean, isolated environment for each workflow run
@@ -91,8 +131,7 @@ In ephemeral mode, the runner will:
91
131
#### Environment Variables
92
132
-`GITHUB_RUNNER_URL` (required): Repository, organization, or enterprise URL
93
133
-`GITHUB_RUNNER_PAT` or `GITHUB_RUNNER_TOKEN` (required): Authentication token
94
-
-`GITHUB_RUNNER_NAME` (optional): Runner name (defaults to hostname, can be overridden by GITHUB_RUNNER_USE_HOSTNAME)
95
-
-`GITHUB_RUNNER_USE_HOSTNAME` (optional): Set to "true" to always use container hostname as runner name, overriding GITHUB_RUNNER_NAME
134
+
-`GITHUB_RUNNER_NAME` (optional): Runner name (defaults to hostname). Supports safe environment variable expansion using standard shell syntax
96
135
-`GITHUB_RUNNER_LABELS` (optional): Comma-separated list of labels
97
136
-`GITHUB_RUNNER_GROUP` (optional): Runner group name
98
137
-`GITHUB_RUNNER_WORKDIR` (optional): Working directory for jobs
0 commit comments