DEV Community

Cover image for Run self-hosted GitHub runners on GitHub Codespaces (Video Tutorial)
Marcel.L
Marcel.L

Posted on • Updated on

Run self-hosted GitHub runners on GitHub Codespaces (Video Tutorial)

Overview

Based on a previous blog post, this devcontainer is now publicly available as a template for anyone to use at Dev Container Templates and integrated with publicly available Codespace images.

Check out the repo and documentation.

Video Tutorial

How to add this community Codespace config

  • Add Codespace secrets on the GitHub repository where the Codespace is to be spun up

image.png

  • Select Add Dev Container Configuration Files...

image.png

  • Select Create a new configuration...

image.png

  • Select Show All Definitions...

image.png

  • Select GitHub Actions Runner

image.png

  • Select Debian version bullseye

image.png

  • Choose version of GitHub Runner to install inside of Codespace

image.png

  • Select any additional features to install (example, Terraform)

image.png

  • Notice .devcontainer now holds Codespace configuration

image.png

NOTE: The config is the same template as found on this public Dev Container .src/github-actions-runner-devcontainer/.devcontainer

  • Commit and sync Dev Container Configuration

image.png

  • Launch new codespace with options

image.png

  • Select options, compute size and Create new Codespace

image.png

Self hosted GitHub Actions runner registers and runs inside Codespace at launch

image.png

Author

Like, share, follow me on: πŸ™ GitHub | 🐧 X/Twitter | πŸ‘Ύ LinkedIn

Top comments (0)