Skip to content
Snippets Groups Projects
Commit 1ccfd5bb authored by Emmanuel Bruno's avatar Emmanuel Bruno
Browse files

adds github runner creation.

parent 0f9cf50d
No related branches found
No related tags found
No related merge requests found
......@@ -243,3 +243,22 @@ _generate_and_install_new_deploy_key() (
gh secret set SSH_PRIVATE_KEY <"${tmpKeydir}/key"
rm -rf tmpKeydir
)
# runner name
github-runner() {
local workdir="$(mktemp --directory /tmp/ghrunner-${1}.XXXXXX)"
docker run -d --restart always \
-e REPO_URL="https://github.com/${GITHUBORG}/${PWD##*/}" \
-e RUNNER_NAME_PREFIX="${GITHUBORG}-${PWD##*/}-runner" \
-e ACCESS_TOKEN=${GITHUBTOKEN} \
-e RUNNER_WORKDIR="${workdir}" \
-v /var/run/docker.sock:/var/run/docker.sock \
-v "${workdir}":"${workdir}" \
myoung34/github-runner:latest
# -e RUNNER_GROUP="my-group" \
# -e RUNNER_SCOPE="org" \
# -e DISABLE_AUTO_UPDATE="true" \
# -e ORG_NAME="${GITHUBORG}" \
#-e LABELS="my-label,other-label" \
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment