/compare/gitlab-ci/github-actions-vs-gitlab-ci
GitHub Actions vs GitLab CI/CD: concepts and syntax side by side
The commands on this page have not been executed by our verification runner yet.updated 2026-10-20
- tool
- GitLab CI/CD
- compares
- GitHub Actions vs GitLab CI/CD
Both run jobs in containers or VMs on hosted or self-managed runners, triggered by pushes and merge or pull requests. GitHub Actions splits CI into many workflow files, each reacting to events, and builds steps from reusable actions. GitLab CI/CD reads one .gitlab-ci.yml (plus includes), orders jobs by stages or needs, and reuses configuration through include, extends and CI/CD components.
Concepts mapped
| Concept | GitHub Actions | GitLab CI/CD |
|---|---|---|
| Config file | .github/workflows/*.yml (many) | .gitlab-ci.yml (one, plus include:) |
| Trigger | on: push / pull_request / schedule … | rules: / workflow:rules with $CI_PIPELINE_SOURCE |
| Ordering | needs: between jobs | stages:, or needs: for a DAG |
| Steps | steps: with run: or uses: | script: (plus before_script, after_script) |
| Reuse | actions, reusable workflows | include:, extends:, CI/CD components |
| Conditions | if: expressions | rules: if/changes/exists |
| Matrix | strategy.matrix | parallel:matrix |
| Secrets | secrets.NAME | masked/protected CI/CD variables |
| Artifacts | actions/upload-artifact | artifacts: |
| Cache | actions/cache or setup-* cache | cache: |
| Runner selection | runs-on: labels | tags: |
The same pipeline
on: [push]
jobs:
test:
runs-on: ubuntu-latest
container: node:24
steps:
- uses: actions/checkout@v5
- run: npm ci
- run: npm teststages: [test]
test:
stage: test
image: node:24
script:
- npm ci
- npm testGitLab checks out the repository automatically; GitHub needs actions/checkout.
Sources
Related pages
errors · gitlab-ciGitLab CI: This job is stuck because the project doesn't have any runners online assigned to itGitLab marks a job stuck when no online runner can take it: no runner registered, runners offline or paused, or job tags that match no runner. Find which.cheat sheets · github-actionsGitHub Actions cheat sheet: triggers, jobs, matrix, outputs and cachingGitHub Actions cheat sheet: triggers, jobs and needs, matrix builds, if conditions, step and job outputs, secrets and env, caching, artifacts, contexts.glossary · argo-cdWhat is GitOps?GitOps keeps the desired state of apps and infrastructure in Git, and an agent such as Argo CD or Flux keeps the cluster matching it and reverts drift.