Interview Prep/CI/CD/GitHub Actions

What are workflows, jobs, steps and actions in GitHub Actions?

BeginnerConceptGitHub Actions
Answer

A workflow is a YAML file in .github/workflows/ triggered by events. It contains jobs, which run on separate runners (in parallel by default). A job contains sequential steps, each either a shell command (run:) or an action (uses:), a reusable unit such as actions/checkout@v4. Steps in one job share the filesystem; jobs do not, so you pass data via outputs and artifacts.

name: ci
on: [push, pull_request]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm ci && npm test
All CI/CD questions

More on GitHub Actions