Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ephemeral runners not supported #7

Open
naikrovek opened this issue Nov 17, 2022 · 0 comments
Open

ephemeral runners not supported #7

naikrovek opened this issue Nov 17, 2022 · 0 comments

Comments

@naikrovek
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant