You're on the right track in exploring deployment options for GitHub self-hosted runners. However, using an Azure Function App for this purpose isn’t a viable approach due to the following reasons:
Azure Functions Are Stateless & Short-Lived
- Azure Functions Are Stateless & Short-Lived
- Azure Functions are designed for transient workloads, whereas GitHub self-hosted runners need to be always running and maintain state.
- Supporting references:
- Azure Functions: Stateless and Short-Lived Executions
- Azure Affairs of State: Serverless and Stateless Code Execution
- Limited Compute Control in Function Apps
- Function Apps operate in a sandboxed environment, restricting system-level access and preventing persistent background processes.
- GitHub self-hosted runners require full control over the system, which Function Apps do not provide.
- Supporting reference:
- About GitHub Self-Hosted Runners
Suggested Method:
Since you’ve already explored Azure Container Apps, I’d suggest considering:
- Azure Container Apps – A flexible, scalable option that can host the runner as a container.
- Azure Virtual Machines – Provides full control and persistence for self-hosted runners.
Please do not forget to click "Accept the answer” and Yes
wherever the information provided helps you, this can be beneficial to other community members.
If you have any other questions or still running into more issues, let me know in the "comments" and I would be happy to help you.