tcardonne / docker-github-runner

Run GitHub Actions on self-hosted runner using Docker.
MIT License
297 stars 124 forks source link

Use the GitHub Actions API to create dynamically a registration token #9

Closed tcardonne closed 4 years ago

tcardonne commented 4 years ago

The actual behavior is to provide a registration token via the environment variable RUNNER_TOKEN. This token can be retrieved from the repository's settings, but this token is only available one hour, which might be a problem is some cases.

We could use the GitHub Actions API to dynamically create this registration token. This API endpoint requires a personal access token, which would be provided via another environment variable (ie, GITHUB_ACCESS_TOKEN).

missedone commented 4 years ago

somebody implement with curl and jq: https://github.com/myoung34/docker-github-actions-runner/blob/master/entrypoint.sh#L9-L26

tcardonne commented 4 years ago

Implemented in v1.2.0 🚀