{"id":31642189,"url":"https://github.com/potatoenergy/gh-runner","last_synced_at":"2026-04-19T04:37:06.601Z","repository":{"id":316413935,"uuid":"1063142452","full_name":"potatoenergy/gh-runner","owner":"potatoenergy","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-24T12:24:12.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-24T13:30:34.908Z","etag":null,"topics":["actions","devops","git","github","github-actions","github-runners"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/potatoenergy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-24T08:16:03.000Z","updated_at":"2025-09-24T12:24:16.000Z","dependencies_parsed_at":"2025-09-24T13:30:38.206Z","dependency_job_id":null,"html_url":"https://github.com/potatoenergy/gh-runner","commit_stats":null,"previous_names":["potatoenergy/gh-runner"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/potatoenergy/gh-runner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potatoenergy%2Fgh-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potatoenergy%2Fgh-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potatoenergy%2Fgh-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potatoenergy%2Fgh-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/potatoenergy","download_url":"https://codeload.github.com/potatoenergy/gh-runner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potatoenergy%2Fgh-runner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278717449,"owners_count":26033542,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","devops","git","github","github-actions","github-runners"],"created_at":"2025-10-07T03:57:04.946Z","updated_at":"2025-10-07T03:57:15.950Z","avatar_url":"https://github.com/potatoenergy.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GH Runner Docker\n\nSelf-hosted GitHub Actions Runner in Docker Container\n\n## Compliance Statement\n\n⚠️ **Runner Usage Requirements**\n- Register only **one runner per container**\n- Use ephemeral mode for security-sensitive workflows\n- Keep runner updated to latest version\n- Limit network exposure of runner\n- Do not store secrets in runner configuration\n\n## Environment Variables\n\n`.env` configuration example:\n```dotenv\n# Runner configuration\nRUNNER_VERSION=2.328.0\nRUNNER_URL=https://github.com/OWNER/REPO\nRUNNER_TOKEN=PASTE_REGISTRATION_TOKEN_HERE\nRUNNER_NAME=gh-runner\nRUNNER_LABELS=self-hosted,linux\nRUNNER_WORK=_work\nEPHEMERAL=false\n```\n\n| Variable | Purpose | Default |\n|----------|---------|---------|\n| `RUNNER_VERSION` | GitHub Actions runner version | 2.328.0 |\n| `RUNNER_URL` | Repository URL for runner registration | - |\n| `RUNNER_TOKEN` | Registration token from GitHub | - |\n| `RUNNER_LABELS` | Comma-separated runner labels | self-hosted,linux |\n| `EPHEMERAL` | One-time use runner | false |\n| `RUNNER_NAME` | Custom runner name | gh-runner |\n| `RUNNER_WORK` | Working directory | _work |\n\n## Key Features\n\n**1. Multi-architecture Support:**\n```bash\n# Build for all supported platforms\ndocker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t ghcr.io/owner/gh-runner:latest .\n```\n\n**2. Ephemeral Mode:**\n```bash\n# One-time runner that self-destructs after workflow\nEPHEMERAL=true\n```\n\n**3. Automatic Configuration:**\n```text\n1. Container starts\n2. Registers with GitHub\n3. Creates health check file\n4. Starts listening for jobs\n5. Automatically unregisters on exit\n```\n\n## Configuration Examples\n\n**Basic setup:**\n```bash\nRUNNER_URL=https://github.com/ponfertato/ponfertato\nRUNNER_TOKEN=abcdef1234567890\n```\n\n**Custom labels for specific workflows:**\n```bash\nRUNNER_LABELS=self-hosted,linux,arm64,cpu-intensive\n```\n\n**Ephemeral runner for security:**\n```bash\n# Only runs one workflow then unregisters\nEPHEMERAL=true\n```\n\n## Technical Architecture\n\n**Runner Lifecycle:**\n1. Container startup\n2. GitHub registration\n3. Health check initialization\n4. Job execution\n5. Automatic cleanup on exit\n\n**Multi-arch Support:**\n```text\nx86_64 → linux-x64\narm64  → linux-arm64\narmv7  → linux-arm\n```\n\n## Deployment\n\n### 1. Build the Runner Image\n\nBuild the multi-architecture Docker image locally:\n\n```bash\ndocker compose -f gh-runner/docker-compose.yml build\n```\n\nThis creates a local Docker image with the specified runner version.\n\n### 2. Start the Runner Service\n\nLaunch the runner container in the background:\n\n```bash\ndocker compose -f gh-runner/docker-compose.yml up -d\n```\n\nThe runner will automatically:\n- Register with GitHub using your provided token\n- Start listening for workflow jobs\n- Create a health check file when ready\n- Unregister itself on container shutdown\n\n### 3. Scale Your Runners (Optional)\n\nTo run multiple instances simultaneously:\n\n```bash\n# Update .env file\nREPLICAS=3\n\n# Recreate the service\ndocker compose -f gh-runner/docker-compose.yml up -d --force-recreate\n```\n\nThis creates 3 identical runners that can handle multiple concurrent workflows.\n\n## Scaling Configuration\n\n**Horizontal scaling:**\n```env\n# .env file\nREPLICAS=3\n```\n\n**Distributed workloads:**\n```yaml\n# docker-compose.yml\ndeploy:\n  replicas: ${REPLICAS}\n```\n\n## License\n\nMIT License","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpotatoenergy%2Fgh-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpotatoenergy%2Fgh-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpotatoenergy%2Fgh-runner/lists"}