Github Actions Kubernetes-Hosted Runner - Token Best Practices

Viewed 13

I'm setting up a self-hosted github runner on a k8s cluster. The runner deployment requires that I supply it a token so that it can link to the proper repository/github account.

There are a lot of examples that I've seen that use a Personal Access Token as a secret resource. It seems like bad practice to use a single user's PAT for what should be a service account token. I am wondering if there are recommended way to use a repository or organization-level token stored as a secret.

Possibly the GITHUB_TOKEN, but this seems too transient as it appears to expire following the completion of a workflow.

Curious about best practices in this case.

0 Answers
Related