Skip to content

GitHub Actions

In one line

GitHub Actions is GitHub's built-in CI/CD platform that automates workflows triggered by repository events.

In simple words

GitHub Actions is a CI/CD service built directly into GitHub. You define workflows in YAML files inside your repository (in the .github/workflows/ directory), and GitHub automatically runs them when certain events happen — like a push, a pull request, or a scheduled time.

A workflow consists of one or more jobs, and each job contains steps. Steps can run shell commands or use pre-built actions from the GitHub Marketplace (e.g., actions/checkout to clone your repo).

GitHub Actions is fully managed — no server to maintain. It provides free minutes for public repositories and a generous free tier for private ones. Runners can be GitHub-hosted (Ubuntu, Windows, macOS) or self-hosted.

Example

yaml
name: CI
on: [push, pull_request]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - run: npm ci
      - run: npm test

This workflow runs on every push and pull request: checks out the code, installs dependencies, and runs tests.

How it works

  1. You create a YAML workflow file in .github/workflows/.
  2. GitHub detects the trigger event (push, PR, schedule, etc.).
  3. It spins up a runner and executes the job steps.
  4. Results appear in the Actions tab with logs and status badges.

Common confusions

  • Confused with: Jenkins

    The difference: GitHub Actions is a managed, built-in service with no maintenance; Jenkins is a self-hosted server that requires setup and upkeep.

Related terms

Decode error messages

Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.

View errors

← Back to glossary