Ravindra BagaleCourses & study guides मराठी

Chapter 90: GitHub Actions Deep Dive

DevOps

90.9 Comparison — GitHub Actions vs Jenkins vs GitLab CI

Story (fictional teaching scenario). In a TCS-style client review in Pune, Maria from Berlin asked: "Which CI should we use?" Vikram did not pick a favourite. He asked where the code lived. Code on GitHub? GitHub Actions is built in. Code on GitLab? GitLab CI is built in. Need many plugins, on-prem control and old pipelines? Jenkins (chapters 20–32) still fits. The answer was about the team and the code home, not hype.

Pick CI by where your code lives and how much server control you need.
Pick CI by where your code lives and how much server control you need.

Why

Interviewers love this question. Real teams also mix tools, so you must explain the trade-offs clearly.

What

Comparison card: GitHub Actions vs Jenkins vs GitLab CI
Comparison card: GitHub Actions vs Jenkins vs GitLab CI
Topic GitHub Actions Jenkins GitLab CI
Where it lives Inside GitHub Your own server Inside GitLab
Pipeline file .​github/​workflows/*.​yml Jenkinsfile (Groovy) .gitlab-ci.yml
Runners / agents GitHub-hosted or self-hosted Agents you run Shared or your own runners
Extending Marketplace actions Plugins Templates and includes
Who maintains server GitHub You GitLab (or you, if self-managed)
Good when Code already on GitHub On-prem, heavy plugin use Code already on GitLab

How

  1. Start from where the code lives.
  2. List hard needs: on-prem only? special plugins? approvals?
  3. Count who will maintain the CI server, if any.
  4. Pick one main tool. Do not run three without a reason.

Example 1: Same "run tests" in three tools

GitHub Actions:  jobs.test.steps: - run: npm test
Jenkins:         stage('Test') { steps { sh 'npm test' } }
GitLab CI:       test: script: - npm test

What it shows: The idea is the same. Only the file format and where it runs change.

Example 2: Approval in each tool

GitHub Actions:  environment: production   (required reviewers)
Jenkins:         input message: 'Deploy to prod?'
GitLab CI:       when: manual  (plus protected environments)

What it shows: All three can pause for a human. The keyword differs.

Ravindra Bagale's Tip

In interviews, never say one tool is best. Say: it depends on where the code lives and who maintains the server, then give one example.

Quick quiz

Q1. Which CI is built into GitHub?

GitHub Actions.

Q2. What file does Jenkins use?

A Jenkinsfile.

Q3. When might Jenkins still be the right pick?

On-prem control, heavy plugin needs or many existing Jenkins pipelines.

Did you understand? Let us try it once more.