mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-11 03:57:01 +00:00
feat: allow ephemeral runner to be optional (#498)
- Adds `ephemeral` option to `runner.spec`
```
....
template:
spec:
ephemeral: false
repository: mumoshu/actions-runner-controller-ci
....
```
- `ephemeral` defaults to `true`
- `entrypoint.sh` in runner/Dockerfile modified to read `RUNNER_EPHEMERAL` flag
- Runner images are backward-compatible. `--once` is omitted only when the new envvar `RUNNER_EPHEMERAL` is explicitly set to `false`.
Resolves #457
This commit is contained in:
@@ -97,5 +97,10 @@ for f in runsvc.sh RunnerService.js; do
|
||||
sudo mv {patched,bin}/${f}
|
||||
done
|
||||
|
||||
args=()
|
||||
if [ "${RUNNER_EPHEMERAL}" != "false" ]; then
|
||||
args+=(--once)
|
||||
fi
|
||||
|
||||
unset RUNNER_NAME RUNNER_REPO RUNNER_TOKEN
|
||||
exec ./bin/runsvc.sh --once
|
||||
exec ./bin/runsvc.sh "${args[@]}"
|
||||
|
||||
Reference in New Issue
Block a user