Are you ready to dive into the world of automation using GitHub Actions and Azure Pipelines but want to do so from your local environment? Well, you’re in luck! This guide will walk you through setting up the Local GitHub Actions and Azure Pipelines Emulator. Not only will you learn how to set it up, but you’ll also understand what troubleshooting steps to take if you encounter issues along the way.
Getting Started with the Emulator
First, let’s cover the installation process. The emulator allows you to run workflows through two main executables: Runner.Server, which functions as a backend similar to GitHub Actions, and Runner.Client, used to schedule workflows via the command line.
Installation Steps
- Download the Action Runner Client + Server: Get the latest version from here.
- Ensure Directory Access:
- On Linux (Docker), any non-overlay filesystem folders should work.
- On macOS (Docker Desktop), you might need to add the install path to Docker’s File Sharing.
- On Windows (Docker Desktop), accept all file sharing requests through Hyper-V backend settings.
- Clone Your GitHub Actions Repo: Make sure you have a repository set up where you can run your workflows.
- Run the Client: Execute Runner.Client(.exe) located in the bin folder of your package inside your repository checkout.
Using the Dotnet Tool (gharun)
If you’re looking to install the .NET SDK, here’s how to do it efficiently:
- Install .NET SDK: Ensure you have version 6.0.0 or newer, which can be found on the official page.
- Install the gharun tool: Run the command:
dotnet tool install --global io.github.christopherhx.gharun - Execute gharun: Use it like you would with Runner.Client.
Understanding the Code – An Analogy
When you look at the code for setting up YAML workflows, think of it as composing a recipe:
- Each step is like a cooking instruction. You need to follow them in the right order to get the desired dish (or outcomes in your workflows).
- Using if statements is like checking if an ingredient is available before deciding whether or not to include it in your dish. If you don’t have tomatoes, for instance, you can’t make a tomato sauce!
- The matrix strategy is like preparing variations of a dish for different dietary preferences. You can have one version for vegans, one for meat lovers, and so on, all while sharing the same base recipe!
Troubleshooting Common Issues
If you encounter issues during your setup, here are some troubleshooting ideas:
- Error: No runner is registered – Make sure that you register a self-hosted runner. You can use options like:
-P ubuntu-latest=-self-hosted - When running containers, ensure that your Docker settings correctly share the necessary paths.
- If you find your environment variables aren’t loading, check your environment secret files and the consistency of your .yaml syntax.
For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
Building the Emulator
To build the Runner.Client and Runner.Server projects, you can execute the following command:
dotnet msbuild src/Runner.proj -t:GenerateConstant
For more advanced options and to generate an OS-independent executable, you can use:
dotnet publish src/Runner.Client -c Release --no-self-contained -p:BUILD_OS=Any
Conclusion
Congratulations! You have now set up your local emulator for GitHub Actions and Azure Pipelines. By following the steps above, you can customize your automation workflows and bring them to life on your local machine. Remember, technology has its quirks, so don’t hesitate to consult the troubleshooting guide if things don’t go as planned.
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

