{
  "manifest_version": "1.0.0",
  "template": {
    "id": "385b46c1-028e-439d-80e2-7c8b87ccc538",
    "slug": "autoscaled-github-actions-runner",
    "name": "Autoscaled Github Actions Runner",
    "description": "Autoscale ephemeral GitHub Actions runners on Railway.",
    "url": "https://railway.com/deploy/autoscaled-github-actions-runner",
    "upstream": {
      "repo_url": "https://github.com/shaezzy/railway-github-runner-autoscaler"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "github-autoscaler",
      "source": {
        "repo": "https://github.com/shaezzy/railway-github-runner-autoscaler"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "github-runner",
      "source": {
        "image": "myoung34/github-runner:latest"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "github-autoscaler",
      "description": "Port the autoscaler webhook server listens on.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "MAX_RUNNERS",
      "service": "github-autoscaler",
      "description": "Maximum number of concurrent runner replicas.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "RUNNER_LABELS",
      "service": "github-autoscaler",
      "description": "Comma-separated labels that a workflow job must have to trigger scaling. Must match the LABELS set on the github-runner service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_API_TOKEN",
      "service": "github-autoscaler",
      "description": "Railway API token used to scale runner replicas. Generate one at railway.app/account/tokens.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "GITHUB_WEBHOOK_SECRET",
      "service": "github-autoscaler",
      "description": "Secret used to validate incoming GitHub webhook payloads. Copy this value into your GitHub webhook settings.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "RAILWAY_RUNNER_SERVICE_ID",
      "service": "github-autoscaler",
      "description": "Railway service ID of the github-runner service. Auto-filled from the github-runner service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LABELS",
      "service": "github-runner",
      "description": "A comma (no spaces!) delimited list of labels for the runner.",
      "secret": false,
      "strategy": "default",
      "default": "self-hosted,railway"
    },
    {
      "key": "EPHEMERAL",
      "service": "github-runner",
      "description": "Flag to configure runner with --ephemeral option. Should be true for autoscaling",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "GITHUB_HOST",
      "service": "github-runner",
      "description": "URL of dotcom or your Github Enterprise server (e.g. github.mycompany.com)",
      "secret": false,
      "strategy": "default",
      "default": "github.com"
    },
    {
      "key": "ACCESS_TOKEN",
      "service": "github-runner",
      "description": "A fine-grained PAT giving the runner access to register itself. Setup -> https://github.com/settings/personal-access-tokens",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "autoscaled-github-actions-runner"
      }
    },
    "cli": "railway deploy --template autoscaled-github-actions-runner",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "385b46c1-028e-439d-80e2-7c8b87ccc538",
            "serializedConfig": {
              "services": {
                "2fe7d55c-e005-4431-a42f-fd55e8ad18eb": {
                  "icon": "https://icon.icepanel.io/Technology/svg/GitHub-Actions.svg",
                  "name": "github-autoscaler",
                  "deploy": {
                    "healthcheckPath": "/health",
                    "restartPolicyMaxRetries": 3
                  },
                  "source": {
                    "repo": "shaezzy/railway-github-runner-autoscaler",
                    "branch": null,
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port the autoscaler webhook server listens on.",
                      "defaultValue": "8080"
                    },
                    "MAX_RUNNERS": {
                      "isOptional": false,
                      "description": "Maximum number of concurrent runner replicas.",
                      "defaultValue": "{{MAX_RUNNERS}}"
                    },
                    "RUNNER_LABELS": {
                      "isOptional": false,
                      "description": "Comma-separated labels that a workflow job must have to trigger scaling. Must match the LABELS set on the github-runner service.",
                      "defaultValue": "${{github-runner.LABELS}}"
                    },
                    "RAILWAY_API_TOKEN": {
                      "isOptional": false,
                      "description": "Railway API token used to scale runner replicas. Generate one at railway.app/account/tokens.",
                      "defaultValue": "{{RAILWAY_API_TOKEN}}"
                    },
                    "GITHUB_WEBHOOK_SECRET": {
                      "isOptional": false,
                      "description": "Secret used to validate incoming GitHub webhook payloads. Copy this value into your GitHub webhook settings.",
                      "defaultValue": "{{GITHUB_WEBHOOK_SECRET}}"
                    },
                    "RAILWAY_RUNNER_SERVICE_ID": {
                      "isOptional": false,
                      "description": "Railway service ID of the github-runner service. Auto-filled from the github-runner service.",
                      "defaultValue": "${{github-runner.RAILWAY_SERVICE_ID}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  }
                },
                "be65b7fd-f1c4-45fc-9e63-d884435512d4": {
                  "icon": "https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/githubactions/githubactions-original.svg",
                  "name": "github-runner",
                  "source": {
                    "image": "myoung34/github-runner:latest"
                  },
                  "variables": {
                    "LABELS": {
                      "isOptional": false,
                      "description": "A comma (no spaces!) delimited list of labels for the runner.",
                      "defaultValue": "self-hosted,railway"
                    },
                    "ORG_NAME": {
                      "isOptional": true,
                      "description": "The organization name. Requires RUNNER_SCOPE to be 'org'.",
                      "defaultValue": ""
                    },
                    "EPHEMERAL": {
                      "isOptional": false,
                      "description": "Flag to configure runner with --ephemeral option. Should be true for autoscaling",
                      "defaultValue": "true"
                    },
                    "GITHUB_HOST": {
                      "isOptional": true,
                      "description": "URL of dotcom or your Github Enterprise server (e.g. github.mycompany.com)",
                      "defaultValue": "github.com"
                    },
                    "ACCESS_TOKEN": {
                      "isOptional": false,
                      "description": "A fine-grained PAT giving the runner access to register itself. Setup -> https://github.com/settings/personal-access-tokens",
                      "defaultValue": "{{ACCESS_TOKEN}}"
                    },
                    "RUNNER_SCOPE": {
                      "isOptional": true,
                      "description": "The scope the runner will be registered on. Valid values are 'repo', 'org', or 'ent'. For 'org' and 'ent', ACCESS_TOKEN is required and REPO_URL is unnecessary. If 'org', requires ORG_NAME; if 'ent', requires ENTERPRISE_NAME.",
                      "defaultValue": ""
                    },
                    "ENTERPRISE_NAME": {
                      "isOptional": true,
                      "description": "The enterprise name for the runner. Requires RUNNER_SCOPE to be 'enterprise'.",
                      "defaultValue": ""
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "github-autoscaler",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": false
  },
  "generated_at": "2026-09-20T16:14:49.616Z",
  "generator_version": "0.1.0"
}
