Self Hosted Runners

Step 3 - Testing the self hosted runner

Test the self hosted runner with an example GitHub workflow.

The following is an example pipeline using the pool we just created:

YAML
---
name: test 
on:
  workflow_dispatch:

permissions:
  contents: write
jobs:
  deploy:
    runs-on: self-hosted
    steps:
      - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
      - name: Run a command
        shell: pwsh
        run: Write-Host "Hello World"

We can see that the pipeline is working just fine:

The workflow run completed

That's it, you now have an agent pool in Github, that will automatically be updated whenever the Microsoft Hosted Runners are updated (through our image). Have fun!

Last updated 2 November 2026 Edit this page on GitHub
Esc