Runners and the marketplace

Intermediate · 20 min

Choose where a workflow runs, GitHub-hosted or self-hosted, and learn how marketplace actions are versioned, found and trusted before you use them.

Before thisWorkflows, triggers, jobs and steps

Mickey Gousset · 20 min

Runners and the marketplace

The player loads from youtube-nocookie.com when you press play. Nothing reaches YouTube before that.

Taught by Mickey GoussetReport a problem with this video
Not started
Set this lesson's status

What you'll learn

  • A runner is the machine that executes a job, and GitHub-hosted runners are fresh virtual machines created for each job and thrown away afterwards.
  • runs-on picks a runner by label, and ubuntu-latest is a moving alias, so pin a version such as ubuntu-24.04 when a change of image would hurt you.
  • Self-hosted runners give you your own hardware and software, but you secure and maintain them, and they are risky on public repositories.
  • An action is a repository with an action.yml, and uses: owner/repo@ref picks a specific version of it.
  • Anything you reference with uses: runs inside your job, so read the source, prefer well-known publishers and pin to a full commit SHA for anything that matters.

Where a job actually runs

A workflow is only a file. Something has to run it, and that something is a runner: a machine with the GitHub Actions agent installed, waiting for jobs. Each job gets its own runner.

You have two kinds to choose from.

GitHub-hosted runners are virtual machines that GitHub provides. A job asks for one, gets a fresh machine, and the machine is discarded when the job ends. The docs say standard runners are ephemeral: each is a new VM. That matters. No leftover files from a previous run can change your results, and nothing a job does persists to the next one. For public repositories, the docs say standard GitHub-hosted runners are free and unlimited. For private repositories, usage counts against your account’s included compute and is then billed. I did not check the current allowances, so look at the pricing page for your plan.

Self-hosted runners are machines you run yourself, on your own hardware or cloud. You choose the specs, install anything, and reach private networks. The cost is that you maintain and secure them.

Choosing with runs-on

runs-on takes a label. From GitHub’s “GitHub-hosted runners” page, read on 2026-11-23, the common labels are:

Label Machine
ubuntu-latest Currently Ubuntu 24.04
ubuntu-24.04, ubuntu-22.04, ubuntu-26.04 Specific Ubuntu versions
ubuntu-24.04-arm Linux on ARM
windows-latest Currently Windows Server 2025
macos-latest Currently macOS 26 on Apple silicon
ubuntu-slim A lighter single-CPU option that runs in a container on a shared VM

The -latest labels are aliases that GitHub moves over time, and the docs note that they point at the latest stable image, which may not be the newest OS release. So this line changes meaning without any commit in your repository:

# either this: whatever GitHub says is current
runs-on: ubuntu-latest
# or this: exactly 24.04, until GitHub retires the image
runs-on: ubuntu-24.04

A moved alias is a classic cause of “it broke and I changed nothing”. For most projects ubuntu-latest is fine, and you fix things when the alias moves. If a build depends on specific system packages, pin the version. A pinned image eventually gets retired, so pinning only buys time.

The docs do not say which Node or git versions each image ships. That is why the workflow in the previous lesson uses actions/setup-node instead of trusting the preinstalled one. The image contents are listed in a README on the runner-images repository.

I could not run any of this. I have no GitHub account where I wrote the lesson, so every label and statement above comes from the docs.

Self-hosted runners, and the warning

Self-hosted runners are useful when you need a GPU, a special network, or software that is awkward to install each time. They are also the riskiest option in GitHub Actions. GitHub’s hardening guide, which I read on 2026-11-23, says they should almost never be used for public repositories. The reason is simple. On a public repository anyone can open a pull request, and a workflow triggered by it may run on your runner. A normal hosted runner is destroyed afterwards. A persistent self-hosted one is not, so whatever an attacker plants can wait for the next job. If you must use self-hosted runners, use ones that are created fresh for each job, and keep them on private repositories only.

Actions: the reusable parts

Look at the steps from the last lesson:

- uses: actions/checkout@v7
- uses: actions/setup-node@v7
  with:
    node-version: 24

Each uses: line pulls in an action, a packaged step. An action is just a GitHub repository with a file named action.yml that declares its inputs, outputs and how it runs. uses: owner/repo@ref means “use the action in that repository, at that Git ref”. The ref is a tag, a branch or a commit SHA.

I read two of these files directly. actions/setup-node at v7 declares inputs such as node-version and cache, and runs on the node24 runtime. actions/checkout at v7 also runs on node24. That is a useful hint, because an action’s runtime has to be supported by the runner, which hosted runners keep current.

The GitHub Marketplace is the searchable catalogue of published actions. Searching it is the easy part. Deciding what to trust is the real work, because an action runs inside your job. It can read your checked-out code, and any secrets you give that job. A marketplace listing is not a security review.

How to trust an action

  • Prefer well-known publishers. The actions/ organization is GitHub’s own. Verified creators carry a badge on their Marketplace listing.
  • Read the source. It is a normal repository. Open action.yml and the code it runs. If the action is a few shell lines, reading it takes two minutes.
  • Pin what matters. A tag can move. I ran git ls-remote https://github.com/actions/checkout refs/tags/v7 refs/tags/v7.0.1 and both tags pointed to the same commit, 3d3c42e5aac5ba805825da76410c181273ba90b1. That is today. When version 7.0.2 is released, v7 will move to it and v7.0.1 will stay. A full 40-character commit SHA never moves. GitHub’s hardening guide recommends SHA pinning for third-party actions, and the hardening lesson shows how.
  • Keep versions fresh. Pinned versions go stale, and Dependabot can open pull requests to bump them.
  • Give each job the least it needs. A third-party action in a job that has no secrets can do far less damage.

What the video covers

Mickey Gousset’s “Introduction to GitHub Actions - Part 4 - The GitHub Marketplace” is about 20 minutes and was published around 2025 (YouTube shows “1 year ago”). Its description says it starts with how to call an action listed in the Marketplace. I could not read a transcript or chapters, so I do not know how far it goes into pinning or trust, and it is a series episode, so it leans on the earlier ones. It covers the marketplace half of this lesson. The runners half comes from the docs, and a TechTrapture video on hosted versus self-hosted runners (about 2023) is linked under deeper. Mickey Gousset works at GitHub, and the video is on his own channel. English is judged from the title, description and channel. It replaces a small-channel pick from the first draft.

Where this fits

Jobs often need credentials and settings. How to give them those safely, and what the ${{ }} expressions in your YAML mean, is next: secrets, variables and contexts.

Check yourself

  1. 01Why is it useful that GitHub-hosted runners are ephemeral?

    Each job starts from a clean machine, so leftovers from earlier runs cannot affect it, and a compromised job cannot leave anything behind for the next one.

  2. 02What does ubuntu-latest point to, and what is the risk of using it?

    It points to the newest stable Ubuntu image GitHub offers, which GitHub's docs currently map to Ubuntu 24.04. When GitHub moves the alias to a newer image, your workflow changes without any commit, which can break it.

  3. 03Why are self-hosted runners dangerous on a public repository?

    Anyone can open a pull request, and a workflow triggered by it can run code on your machine. A persistent runner can then be compromised for good. GitHub's guidance says they should almost never be used for public repositories.

  4. 04What does uses: actions/checkout@v7 refer to?

    The actions/checkout repository on GitHub, at the ref v7, which is a tag. The runner downloads that version of the action and runs it as a step.

Go deeper

Notes

Private to you

Esc
↑↓ navigate↵ open? shortcuts

Keyboard shortcuts

Press Esc to close

Anywhere

⌘K
Search and commands
/
Search
?
This sheet
Esc
Close

Reading a lesson

J
Next lesson
K
Previous lesson
B
Bookmark