tiagocborg/On-demand self-hosted Azure VM runner for GitHub Actions

GitHub Action for automatic creation and registration of Azure VM as a GitHub Actions self-hosted runner.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
modeSpecify the operation mode: - 'start' - to create a new Azure VM runner - 'stop' - to terminate the previously created runneryes
github-tokenGitHub Personal Access Token with the 'repo' scope assigned.yes
vm-sizeAzure VM size (e.g., Standard_D2s_v3, Standard_D4s_v3). Required for 'start' mode unless using zones-config.no
image-idCustom Azure image resource ID. Use this OR image-publisher/offer/sku.no
image-publisherAzure Marketplace image publisher (e.g., Canonical). Use with image-offer and image-sku.no
image-offerAzure Marketplace image offer (e.g., 0001-com-ubuntu-server-jammy).no
image-skuAzure Marketplace image SKU (e.g., 22_04-lts-gen2).no
image-versionAzure Marketplace image version. Defaults to 'latest'.nolatest
subnet-idAzure subnet resource ID. The subnet must exist in the specified resource group's VNet. Required for 'start' mode unless using zones-config.no
network-security-group-idAzure Network Security Group resource ID. The NSG should allow outbound traffic to GitHub (TCP/443).no
assign-public-ipWhether to assign a public IP address to the VM. Set to 'true' if the subnet doesn't have outbound internet via NAT gateway.nofalse
resource-group-nameAzure resource group where the VM will be created. Required for 'start' mode unless using zones-config.no
locationAzure region (e.g., eastus, westeurope). Required for 'start' mode unless using zones-config.no
vm-resource-idAzure VM resource ID of the created runner. Required for 'stop' mode to terminate the VM.no
labelUnique label assigned to the runner. Required for 'stop' mode to deregister the runner from GitHub.no
pre-runner-scriptBash commands to run before the GitHub runner starts. Useful for installing dependencies (apt-get, yum, etc.).no
packagesJSON array of packages to install via cloud-init. Example: '["git", "docker.io", "nodejs"]'no[]
runner-home-dirDirectory containing pre-installed actions-runner software. If set, skips runner download. Example: /home/runner/actions-runnerno
managed-identity-idUser-assigned managed identity resource ID to attach to the VM. Enables credential-free access to Azure resources.no
ssh-public-keySSH public key for VM authentication. Enables SSH access for debugging. Example: 'ssh-rsa AAAAB3NzaC1yc2E... user@host'no
spot-instanceUse Azure Spot VM for cost savings (up to 90% discount). Note: Spot VMs can be evicted with 30 seconds notice.nofalse
spot-max-priceMaximum hourly price for Spot VM in USD. Set to -1 (default) for no price limit (pay up to on-demand price).no-1
resource-tagsJSON object of tags to apply to Azure resources. Example: '{"Environment": "CI", "CostCenter": "Engineering"}'no{}
zones-configJSON array of zone configurations for multi-region failover. Each object should contain: location, resourceGroupName, subnetId. Optional per-zone: networkSecurityGroupId, imageId, imagePublisher, imageOffer, imageSku. Example: '[{"location":"eastus","resourceGroupName":"rg-east","subnetId":"/subscriptions/.../subnets/default"}]'no
startup-quiet-period-secondsSeconds to wait after VM starts before checking runner registration. Allows time for cloud-init and pre-runner script to complete.no30
startup-retry-interval-secondsSeconds between runner registration checks.no10
startup-timeout-minutesMaximum minutes to wait for runner to register with GitHub.no5
run-runner-as-serviceRun the GitHub runner as a systemd service instead of ./run.sh.nofalse
run-runner-as-userRun the GitHub runner as this user instead of root.no
os-disk-size-gbOS disk size in GB. Defaults to image default (usually 30GB).no
os-disk-typeOS disk type: Premium_LRS, StandardSSD_LRS, Standard_LRS. Premium requires VM sizes that support premium storage.noStandardSSD_LRS
namedescription
labelUnique label assigned to the runner. Use as 'runs-on' value for subsequent jobs. Required input for 'stop' mode.
vm-resource-idAzure resource ID of the created VM. Required input for 'stop' mode.
locationAzure region where the VM was created. Useful when using zones-config for failover.