- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud

Setting Up a Custom GitHub Actions Runner
You are setting up a new app’s CI/CD process. Due to compliance requirements, this team’s code needs to run on your organization’s infrastructure, not GitHub’s. You will be provided with an EC2 instance, which you will need to set up to work as a GitHub runner. You will then need to set up a workflow to run only on that runner. Finally, you will need to disconnect the runner from your repo for the end of the lab.

Lab Info
Table of Contents
-
Challenge
Set Up the Lab VM to Work as a Runner Connected to Your GitHub Repo
-
Create a new GitHub repo. Under Settings, click on Actions, then Runners. Click Add Runner and select Linux as the operating system. GitHub will generate a set of scripts to configure and enable the runner agent. Note these scripts for the next step.
-
SSH into the lab VM. Run the first set of commands to download and extract the installer. Then, run the
configure
commands. Leave the terminal session open with the trailing logs. Back in the GitHub console, you will see the runner show up.
-
-
Challenge
Set Up a Workflow to Run on the Runner
-
Create a
/github/workflows/action.yaml
file. Create a workflow with one job and one step. It can echoHello cloud gurus
. Set up the job to run on the self-hosted runner. Commit the changes. -
You can see the job's execution status in the GitHub console. You can also go back to the terminal with your SSH session and see the log from the runner.
-
-
Challenge
Remove the Runner from Your Repo
When the lab ends, the runner will be destroyed. However, you will need to go into your GitHub repo and manually delete the runner's record from there. This can be done at any time. Remember if you want to run that workflow again, you will need to update the
runs-on
command.
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.