Windows self-hosted runners
Windows self-hosted runners for GitHub Actions are available since v2.4.0.
RunsOn Windows runners are ~10x cheaper than the official GitHub Actions Windows runners (m7i family).
Default images
Section titled “Default images”You can opt into a specific image by setting the image
label in your workflow.
Image | Description |
---|---|
windows22-full-x64 | Windows2022 x64 image mostly compatible with official Windows2022 GitHub runner image |
windows22-base-x64 | Base Windows2022 x64 image, boots faster but has no preinstalled software |
To use them, you need to reference the image you want to use and an instance family that supports Windows:
jobs: build: runs-on: runs-on=${{ github.run_id }}/image=windows22-full-x64/family=m7i
Example
Section titled “Example”name: Windows
on: workflow_dispatch:
jobs: default: runs-on: runs-on=${{ github.run_id }}/image=windows22-full-x64/family=m7i steps: - name: Checkout uses: actions/checkout@v4 - name: Check current dir and env variables run: | dir . echo $env:USERNAME echo $env:RUNS_ON_RUNNER_NAME - name: Logs run: | Get-Content -Path "C:\runs-on\output.log" - name: Users run: | Get-LocalUser | Format-Table -AutoSize Name,Enabled,PasswordLastSet
Inspecting agent logs
Section titled “Inspecting agent logs”On Windows runners, the output of the RunsOn agent is stored in the C:\runs-on\output.log
file.
Those logs are also shipped to the CloudWatch log group for EC2 instances.
Limitations
Section titled “Limitations”- Full images should be mostly compatible with the official GitHub Actions Windows runners. Please let me know if you find any issues.
- Windows runners are quite slow to boot (~1min currently for base images, ~2min for full images).
- Debug mode is not yet supported on Windows runners.