Deploy GitHub Actions Runner
A self-hosted GitHub Actions runner
myoung34/github-runner
myoung34/github-runner
Just deployed
Run GitHub Actions in Railway if, for example, you want to access your services or databases using private networking.
Caution! GitHub recommends only using self-hosted runners for private repositories!!
Per-repository runner
Go to your repository settings, then click actions, then runners, then "New self-hosted runner". Under the "configure" section, you'll see a line with --url and --token. Put the value of --url in the REPO_URL env var, and the value of --token in the RUNNER_TOKEN env var.
Organization-wide runner
Go to your org's settings, then actions, then runners. Click "New Runner", then "Self-hosted runner". Under "Configure", copy the value after --token and paste it into the RUNNER_TOKEN env var.
Set RUNNER_SCOPE to org and ORG_NAME to the name of your org.
Using it in GitHub Actions
Just set runs-on to self-hosted in your workflow.
More config
See the GitHub repo for all available environment variables and tags.
App sleeping
Do not use app sleeping with this template. Runners work by long-polling and will not wake themselves up when there's a new job to run.
Template Content
myoung34/github-runner
myoung34/github-runnerRUNNER_TOKEN
The token shown with --token when creating the runner in GitHub