Cloud Explainers

DevOps Pipelines: Jenkins vs GitHub Actions

DevOps & CI/CD9 min videoPublished Nov 15, 2026

Jenkins or GitHub Actions? We push the same small project to both and watch what happens: GitHub starts in 4.1 seconds but can't reach a staging server on a private office network, while Jenkins, polling every minute, takes 59 seconds and deploys. Then a change both catch, a self-hosted runner that gives GitHub Actions a way into the office, a three-version test matrix, and what each one costs you to run.

The same push, twice

You need a pipeline that tests and deploys your code, and everyone says Jenkins or GitHub Actions. Most people guess the hosted one, GitHub Actions, wins: nothing to run, and it starts in seconds. Ana keeps a dog grooming salon's booking site. She pushes the same code to the office Git server, which Jenkins watches, and to GitHub.

Ana's laptop
git remote -vgithub	https://github.com/cloudexplainers/grooming-salon-ci.git (fetch)
github	https://github.com/cloudexplainers/grooming-salon-ci.git (push)
office	git://gitserver/salon.git (fetch)
office	git://gitserver/salon.git (push)
Ana's laptop
git push -q office main
Ana's laptop
git push -q github main

GitHub started its job in 4.1 seconds. Jenkins took 59. Then GitHub's deploy timed out: it couldn't reach staging, the salon's test copy of the site. Jenkins deployed fine. GitHub's runner did nothing wrong. It just isn't in Ana's building.

Ana's laptop
gh run view 43741177768 --log-failed | cut -f3- | cut -d' ' -f2- | grep -E '^curl:|error'curl: (28) Failed to connect to 10.42.0.20 port 8000 after 5002 ms: Timeout was reached
##[error]Process completed with exit code 28.
Ana's laptop
curl -sn http://jenkins:8080/job/salon/1/consoleText | grep -E '^Started|passed|failed|deployed|Finished'Started by an SCM change
2 passed in 0.00s
staging: deployed
Finished: SUCCESS

What a pipeline is

So what is a pipeline? A list of steps a machine runs every time your code changes: get the code, run the tests, and if they pass, deploy it. Both tools run that list; they differ in where the machine is, and who looks after it. And there is a way to get the best of both. We'll build it before the end.

A pipeline: the same steps on every change: diagram of A push, Get the code, Run the tests, Deploy

You'll see two letters for this everywhere: CI/CD. CI, continuous integration, means every change gets built and tested as soon as it's pushed. CD, continuous delivery, means a change that passes can go out on its own, here, to the staging server.

Two letters, two halves: diagram of CI / CD, CI = continuous integration, CD = continuous delivery, Jenkins and GitHub Actions both do both

The two tools come from different places. Jenkins is an open source program you install on your own server, and plugins let it run almost anything. GitHub Actions is built into GitHub itself, so if your code already lives there, there is nothing to install.

Two tools, two homes: comparison table of Jenkins vs GitHub Actions, What it is, Runs on, Grows with, To install

Think of laundry. Jenkins is a washing machine you own: it sits in your house, it can reach everything in it, and when it breaks, you fix it. GitHub Actions is a laundromat: a clean machine every time, someone else repairs it, and you pay per load. But your laundry has to travel there.

Your own machine, or a laundromat: cards of Jenkins: your machine, You fix it, Actions: a laundromat, Pay per load

Two files, one plan

Both pipelines are a file in the project, next to the code, so a change to the pipeline is saved and reviewed like any other change. Jenkins reads the Jenkinsfile: stages, each with steps. Agent any means: any machine Jenkins has. And pollSCM, poll source control, tells Jenkins to ask the Git server for new commits, every minute.

Ana's laptop
cat Jenkinsfilepipeline {
    agent any
    triggers { pollSCM('* * * * *') }
    stages {
        stage('Test') {
            steps {
                sh 'echo "$(nproc) CPUs"'
                sh 'python3 -m pytest -q'
            }
        }
        stage('Deploy') {
            steps { sh 'curl -fsS --connect-timeout 5 http://10.42.0.20:8000/deploy' }
        }
    }
}

GitHub reads YAML files from the workflows folder: jobs, each with steps. On push means: run on every push. And runs-on picks the machine: a fresh Ubuntu machine GitHub lends for this one job, so the file sets up Python itself, because the machine starts with nothing of Ana's.

Ana's laptop
cat .github/workflows/ci.ymlname: ci
on: push
jobs:
  test-and-deploy:
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v7
      - uses: actions/setup-python@v7
        with:
          python-version: "3.12"
      - run: echo "$(nproc) CPUs, $(uptime -p)"
      - run: pip install pytest
      - run: python -m pytest -q
      - run: curl -fsS --connect-timeout 5 http://10.42.0.20:8000/deploy

Who starts the build

That's the first real difference: who notices the push. GitHub holds the code, so it sees every push the moment it lands. Jenkins lives somewhere else, so it has to ask: anything new? Once a minute. Polling isn't wrong: it's simple, and it works even when the Git server can't reach Jenkins at all.

Who notices the push: diagram of Laptop, Git server, Jenkins, GitHub, push: a job starts, push, anything new?, yes: build, Jenkins asks once a minute: simple, nothing has to reach it

In Ana's run, that meant 4.1 seconds against 59. It changes from push to push, anywhere up to a minute. A webhook, where the Git server calls Jenkins straight away, removes the wait, but it's one more thing to set up and keep working.

Seconds from the push to the build starting: chart of GitHub Actions: 4.1 seconds, Jenkins, polling: 58.6 seconds, Polling: anywhere from 0 to 60 s

Where the job runs

The bigger difference is where the work happens. Jenkins runs in Ana's office network, next to the Git server and the staging server, so it deploys directly. GitHub's runner, the machine that runs each job, is in GitHub's cloud. It can reach the internet, but the office network is private: nothing outside can connect in. That's the timeout we saw.

Where each one runs: diagram of Ana's laptop, Office Git server, Jenkins, Staging server, GitHub repository, Hosted runner, Ana's office network, GitHub's cloud

And that cloud machine is brand new for every job. GitHub's own documentation says it plainly: each hosted runner is a new virtual machine.

Where the job runs: browser screenshot from the video

Ana's run printed it: 2 CPUs, up zero minutes. Started for her job, thrown away after it. Nothing is left over from last time, so every run installs Python and pytest again, unless a cache step saves the downloads and brings them back next time. Jenkins runs on whatever machine you give it, 10 CPUs here, with Python installed once, by Ana.

Ana's laptop
gh run view 43741177768 --log | cut -f3- | cut -d' ' -f2- | grep -E '^[0-9]+ CPUs'2 CPUs, up 0 minutes
Ana's laptop
curl -sn http://jenkins:8080/job/salon/1/consoleText | grep -E '^[0-9]+ CPUs'10 CPUs

A change the tests catch

Now a change the tests don't expect. Someone edits one line, so the last slot of the day disappears. The test still says an empty day has eight free slots. Ana pushes to both. Which one catches it?

Ana's laptop
git diffdiff --git a/slots.py b/slots.py
index 41b372d..642355b 100644
--- a/slots.py
+++ b/slots.py
@@ -5,4 +5,4 @@ OPEN, CLOSE = 9, 17          # the salon opens 9:00, last slot starts 16:00

 def free_slots(booked):
     """Hours still free today, given the hours already booked."""
-    return [h for h in range(OPEN, CLOSE) if h not in booked]
+    return [h for h in range(OPEN, CLOSE - 1) if h not in booked]

Both. The same test fails on both machines, with the same message: seven slots, where it expected eight. That part doesn't change between tools. The tests are yours; the pipeline only decides where they run.

Ana's laptop
curl -sn http://jenkins:8080/job/salon/2/consoleText | grep -E '^(E +assert|FAILED|[0-9]+ failed|Finished)'E       assert 7 == 8
FAILED test_slots.py::test_empty_day_has_eight_slots - assert 7 == 8
1 failed, 1 passed in 0.00s
Finished: FAILURE
Ana's laptop
gh run view 43741281007 --log-failed | cut -f3- | cut -d' ' -f2- | grep -E '^(E +assert|FAILED|[0-9]+ failed)'E       assert 7 == 8
FAILED test_slots.py::test_empty_day_has_eight_slots - assert 7 == 8
1 failed, 1 passed in 0.01s

Getting both

So can Ana keep GitHub's workflow and still deploy into her office? Yes: with a self-hosted runner. It's GitHub's own runner program, installed on a machine inside the office. It connects out to GitHub and asks for work, so nothing has to get in. Deploy jobs run there; tests stay on GitHub's machines.

A runner inside the office: diagram of Ana's laptop, Office Git server, Jenkins, Staging server, GitHub repository, Office runner, Ana's office network, GitHub's cloud

In the workflow, the deploy job gets its own lines, and runs-on names the office runner instead of a GitHub machine. One caution from GitHub's own docs: use self-hosted runners with private repositories. Workflows can run on a pull request, someone's proposed change, so on a public one, a stranger's code could run on your office machine.

The deploy job, moved into the office: code change of ci.yml, runs-on: [self-hosted, office] (labels: any self-hosted runner tagged office), Self-hosted runners: private repositories only

While she's there, Ana adds one thing GitHub makes easy: testing on three Python versions, with a matrix: one job, copied once for each version. Three versions. How much longer does the run take?

Ana's laptop
git diffdiff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 490f04c..73f5d15 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,14 +1,21 @@
 name: ci
 on: push
 jobs:
-  test-and-deploy:
+  test:
     runs-on: ubuntu-24.04
+    strategy:
+      matrix:
+        python: ["3.11", "3.12", "3.13"]
     steps:
       - uses: actions/checkout@v7
       - uses: actions/setup-python@v7
         with:
-          python-version: "3.12"
+          python-version: ${{ matrix.python }}
       - run: echo "$(nproc) CPUs, $(uptime -p)"
       - run: pip install pytest
       - run: python -m pytest -q
+  deploy:
+    needs: test
+    runs-on: [self-hosted, office]
+    steps:
       - run: curl -fsS --connect-timeout 5 http://10.42.0.20:8000/deploy
diff --git a/slots.py b/slots.py
index 642355b..41b372d 100644
--- a/slots.py
+++ b/slots.py
@@ -5,4 +5,4 @@ OPEN, CLOSE = 9, 17          # the salon opens 9:00, last slot starts 16:00

 def free_slots(booked):
     """Hours still free today, given the hours already booked."""
-    return [h for h in range(OPEN, CLOSE - 1) if h not in booked]
+    return [h for h in range(OPEN, CLOSE) if h not in booked]

About the same. Each version got its own fresh machine, all starting together, done in 10 to 18 seconds. Then deploy ran on the office runner, and this time staging answered: deployed. On Jenkins, three Python versions means three Pythons installed on your servers, and kept up to date.

Ana's laptop
gh run view 43741375602✓ main ci · 43741375602
Triggered via push less than a minute ago

JOBS
✓ test (3.13) in 18s (ID 132895080520)
✓ test (3.12) in 16s (ID 132895080735)
✓ test (3.11) in 10s (ID 132895080857)
✓ deploy in 2s (ID 132895177637)

For more information about a job, try: gh run view --job=<job-id>
View this run on GitHub: https://github.com/cloudexplainers/grooming-salon-ci/actions/runs/43741375602
Ana's laptop
gh run view 43741375602 --log | cut -f3- | cut -d' ' -f2- | grep -E '^staging:'staging: deployed

Jenkins built the same three pushes, one build each. Its page keeps the history: build one green, build two red, build three green again.

Getting both: browser screenshot from the video

What each one costs

Now cost. Jenkins itself is free, open source software. But it needs a server that's always on: ours used about 890 megabytes of memory, doing nothing. And this one simple pipeline needed 63 plugins, the add-ons that give Jenkins Git and pipelines, each one something to keep updated. Jenkins publishes security warnings for itself and its plugins, and on your server, applying the fixes is your job. That's the washing machine you own.

What owning Jenkins costs: cards of Free software, A server, always on, 63 plugins, Security fixes

Each of those shows up on this page, with its own version to watch.

What each one costs: browser screenshot from the video

GitHub Actions is the laundromat. On public repositories, standard runners are free. On private ones, each plan includes some usage, and after that a standard Linux runner costs six dollars for every thousand minutes. A failed run counts too: you pay for the minutes it ran. You pay per load.

What each one costs: browser screenshot from the video

Which one to pick

Where does Jenkins still win? When builds need machines GitHub doesn't rent, when code must never leave the building, when builds run so long or so often that per-minute pricing adds up, and when a team already has years of Jenkins jobs that work.

Where Jenkins still wins: cards of Special machines, Code stays inside, Long, frequent builds, Years of jobs

So which one? If your code is already on GitHub and deploys to the cloud, start with GitHub Actions: there's nothing to run, and a self-hosted runner covers the odd job inside. If one of those four fits you, Jenkins is still a solid choice. In short: with Jenkins you own the machine. With Actions, you rent it.

Jenkins or GitHub Actions?: comparison table of Jenkins vs GitHub Actions, Runs on, Starts on, Your network, You look after, In short

Recap

Same tests, two places to run them. Jenkins: your server, inside your network, yours to maintain. GitHub Actions: a fresh machine for every job, started by every push, outside your network unless you add a runner.

Two places to run the same tests: diagram of Ana's laptop, Office Git server, Jenkins, Staging server, GitHub repository, Hosted runner, Ana's office network, GitHub's cloud

If this made the choice easier, a like helps YouTube show it to more beginners, and subscribing brings you the next one.

Every run you saw was real: Jenkins in our lab, and GitHub Actions on GitHub. The lab files and every command are linked in the description. Thanks for watching Cloud Explainers.

Sources

Demos: Jenkins, a Git server, a staging server and a self-hosted runner in Docker on our own Mac, standing in for an office network; GitHub Actions ran for real in a private lab repository. The salon is made up; 10.42.0.0/24 is a private address range. Watch the full video on YouTube.

More videos

DevOps & CI/CD9 min

DevOps with Ansible Will Finally Make Sense After This

Networking9 min

How SNMP Network Monitoring Works

Git8 min

How to Fix GitHub 'Permission Denied (publickey)' Errors

PostgreSQL7 min

How to Fix PostgreSQL 'Password Authentication Failed'

Linux8 min

Why One Linux Server Handles More Users Than You Think

Networking7 min

How to Fix Network 'Connection Refused' Errors

Networking11 min

Every Networking Term a Beginner Needs in 12 Minutes

Docker6 min

How to Fix Docker 'Permission Denied' on docker.sock

Git7 min

How to Fix Git 'Updates Were Rejected' When You Push

Linux7 min

How to Fix nginx 502 Bad Gateway Errors on Linux

Linux8 min

How to Fix Linux apt 'Could Not Get Lock' Errors (Ubuntu)

Networking9 min

How Email Works on the Internet (SMTP) in 10 Minutes

Python8 min

The Python Roadmap for Beginners

Go (Golang)21 min

Golang REST API with Gin: Full Tutorial for Beginners

Networking10 min

How a WireGuard VPN Network Works

Linux9 min

Linux Makefiles Will Finally Make Sense After This

Auth (OAuth, JWT)9 min

SAML vs OAuth vs OpenID Connect: What's the Difference?

Python7 min

How to Fix Python cron Jobs That Never Run

Linux22 min

Linux Bash Scripting: Full Tutorial for Beginners

Networking10 min

How PXE Network Boot Works

Active Directory9 min

How Active Directory Works

Linux10 min

How to Fix a Linux systemd Service That Won't Start

Linux9 min

Linux Logs: syslog vs journald

Auth (OAuth, JWT)9 min

JWT vs Session Cookies: Which One Should You Use?

Docker10 min

Docker vs Docker Compose: Which One Should You Use?

Docker9 min

How to Fix Docker Compose Containers That Can't Talk to Each Other

Django (Python web framework)22 min

Django Full Tutorial for Beginners

Linux9 min

How Linux systemd Works

Networking8 min

How to Fix 'Windows Cannot Access' Network Share Errors (SMB)

APIs10 min

REST vs gRPC: Which One Should You Use?

Certificates & PKI (ADCS)9 min

How to Fix SSL Certificate Chain Errors (Missing Intermediate)

Python9 min

Every Python Concept for Beginners in 10 Minutes

Databases & SQL9 min

Every SQL Join Type in 10 Minutes

OpenRouter (one API for many AI models)9 min

Why OpenRouter Free Models Hit Their Limit So Fast

Gemini API & Google AI Studio9 min

Why Your Gemini API Free Tier Runs Out So Fast

OpenRouter (one API for many AI models)10 min

OpenRouter Will Finally Make Sense After This

Caching & Redis10 min

How Redis Caching Works

Gemini API & Google AI Studio10 min

Gemini API vs Vertex AI: Which One Should You Use?

Gemini API & Google AI Studio8 min

How to Fix a Leaked Gemini API Key

Go (Golang)9 min

Why Golang Uses Goroutines Instead of Threads

Gemini API & Google AI Studio9 min

How to Fix Gemini API Error 429: Resource Exhausted

Claude & the Claude Developer Platform10 min

Claude Token Pricing Will Finally Make Sense After This

Python11 min

Why Python Web Scraping Returns Nothing (and the Fix)

Python10 min

Python uv vs pip: Which One Should You Use?

Python22 min

Python Automation: Full Tutorial for Beginners

Auth (OAuth, JWT)9 min

How OAuth Login Works

Gemini API & Google AI Studio10 min

Google AI Studio Will Finally Make Sense After This

Docker10 min

What Happens When You Run a Docker Container

Claude & the Claude Developer Platform8 min

How to Fix Claude Code Billing Your API Key Instead of Your Plan

Auth (OAuth, JWT)9 min

Why Passkeys Can't Be Phished Like Passwords

PowerShell10 min

PowerShell vs Bash: Which One Should You Learn?

Linux10 min

The Linux Roadmap for Beginners

Django (Python web framework)9 min

Django vs FastAPI: Which One Should You Use?

Databases & SQL10 min

Why SQLite Is the Most Used Database in the World

Databases & SQL11 min

How a NoSQL Database Like MongoDB Works

Python11 min

How to Fix Python pip error: externally-managed-environment

Databases & SQL9 min

How to Fix MySQL Too Many Connections Database Errors

Go (Golang)9 min

Golang Concurrency Will Finally Make Sense After This

AWS10 min

How Amazon S3 Works

Kubernetes10 min

How Kubernetes Works

Git10 min

How Git Works

Docker10 min

How to Fix Docker Port Already Allocated Errors

PostgreSQL10 min

How PostgreSQL Works

Git8 min

How to Fix Git Merge Conflicts

Linux9 min

How to Fix No Space Left on Device in Linux

Networking10 min

How the Internet Works

Databases & SQL9 min

SQL vs NoSQL: When Each One Wins

Auth (OAuth, JWT)8 min

How to Fix JWT Token Expired Errors (401 Unauthorized)

Claude & the Claude Developer Platform9 min

Claude API vs Claude Pro: Why Your Subscription Doesn't Include It

AI agent skills9 min

Why AI Agent Skills Beat Giant Prompts

Linux10 min

Linux Cron Jobs Will Finally Make Sense After This

Cybersecurity10 min

Security Logs Will Finally Make Sense After This

Cybersecurity8 min

How to Fix a Security Leak: An API Key Pushed to GitHub

DNS9 min

DNS Will Finally Make Sense After This

Cybersecurity9 min

Never Ignore a Security Update

Auth (OAuth, JWT)9 min

Two-Factor Authentication Will Finally Make Sense

Networking8 min

Never Expose a Database to the Internet

Cybersecurity10 min

SSH Keys vs Passwords: Which Is Safer for Security?

Linux10 min

The 5 Levels of Linux Boot: From Power On to Login

Networking12 min

The 5 Levels of Network Firewalls

Cybersecurity10 min

Password Security: Why Hackers Crack Weak Passwords

Linux9 min

Why Your Linux Server Runs Out of Memory

Networking10 min

HTTP vs HTTPS: What Actually Changes on Your Network

Linux12 min

Every Linux File Permission You Need to Know

Linux10 min

Linux Processes vs Threads: When Each One Wins

Networking11 min

The OSI Model Will Finally Make Sense After This

Git11 min

The 7 Levels of Git

Networking10 min

Every Network Troubleshooting Command You Need

Cybersecurity10 min

Hashing vs Encryption in Cybersecurity: When Each One Wins

Networking11 min

Why the Internet Ran Out of IP Addresses

Linux11 min

Linux Package Managers: apt vs Snap vs Flatpak

Python9 min

Why Python Is Slow (and When It Doesn't Matter)

Networking11 min

TCP vs UDP: When Each One Wins

Linux8 min

Stop Running Linux as Root (Do This Instead)

Linux11 min

Linux Users and Groups Will Finally Make Sense

Cybersecurity9 min

Why Phishing Beats Good Security (and How to Spot It)

Docker12 min

The 7 Levels of Docker

AI agents & MCP12 min

AI Agents Will Finally Make Sense After This

Git8 min

Stop Using git push --force (Use This Instead)

AI agent skills10 min

Agent Skills vs MCP: When Each One Wins

Networking12 min

Networking Will Finally Make Sense After This

Linux12 min

Every Linux Command You Actually Need

Cybersecurity12 min

The 7 Levels of Cybersecurity

System design12 min

Every System Design Concept You Need, in One Diagram

PostgreSQL10 min

Why PostgreSQL Ignores Your Index