-
Notifications
You must be signed in to change notification settings - Fork 16
Description
the --ephemeral runtime option isn't supported directly (it is via ${RUNNER_OPTIONS} I guess, but that doesn't change execution or deregistration of the runner.)
You appear to be emulating the ephemeral runner behavior here with the deregistration at the end of entrypoint.sh so just hard-code that into the ./config.sh line and remove the deregistration stuff. Probably don't need to run as a service, either; you can just have a bunch of UNSET lines which clean up the environment and call ./run.sh after configuration. The runner will exit after the job is complete, and the container will shut down, which appears to be the desired behavior. using set -i ./run.sh will fail, unfortunately, because some environment variables are needed.
This should do, I think. After adding --ephemeral to the ./config.sh line, replace everything after that command with this:
unset API_BASE
unset GITHUB_TOKEN
unset GROUP
unset OPTIONS
unset RUNNER_ENTERPRISE_URL
unset RUNNER_GROUP
unset RUNNER_LABELS
unset RUNNER_NAME
unset RUNNER_OPTIONS
unset RUNNER_ORGANIZATION_URL
unset RUNNER_REP
unset RUNNER_URL
unset RUNNER_WORK_DIRECTORY
unset SCOPE
unset TOKEN
unset TOKEN_URL
echo "Starting GitHub Actions Runner"
./run.sh