GitHub Actions Runners: Hosted vs Self-Hosted Explained

🚀 Day 42 of #90DaysOfDevOps – Understanding GitHub Actions Runners Today I explored how GitHub Actions executes CI/CD jobs using runners. Every workflow job needs a machine to run on, and GitHub provides two types: • GitHub-hosted runners (managed by GitHub) • Self-hosted runners (managed by you) 🔹 What I implemented today ✅ Created a workflow with 3 parallel jobs running on different operating systems: ubuntu-latest windows-latest macos-latest Each job printed: OS name Runner hostname Current user running the job This helped me understand how GitHub dynamically provisions different environments for CI pipelines. 🔹 Explored Pre-installed Tools On the ubuntu-latest runner, I checked versions of: Docker Python Node.js Git One key learning: GitHub-hosted runners already include many developer tools, which speeds up CI pipelines because we don't need to install everything manually. 🔹 Self-Hosted Runner Setup (The fun part) I registered a self-hosted runner to my GitHub repository and configured it on my machine. Then I created a workflow that: Printed the hostname of my machine Displayed the working directory Created a file during the workflow run And yes… the file actually appeared on my machine after the workflow finished. 🤯 This means the CI pipeline was running directly on my own hardware instead of GitHub’s infrastructure. 🔹 Added Runner Labels I also added a custom label to my runner and updated the workflow to target it. This is very useful when managing multiple self-hosted runners in larger environments. 🔹 Key Takeaways • GitHub-hosted runners Managed by GitHub Free with usage limits Many tools already pre-installed Great for quick CI jobs and testing across OS environments • Self-hosted runners Managed by you or your team Runs on your own machine or cloud VM Full control over installed tools and environment Useful for heavy builds, custom setups, or long-running jobs Running CI pipelines on my own machine was definitely a cool DevOps moment today. 🔧 #90DaysOfDevOps #DevOpsKaJosh #TrainWithShubham

To view or add a comment, sign in

Explore content categories