Git & GitHub Interview Question #85

What is GitHub Actions?

GitHub Collaboration, Repository Rules, Issues, Releases & Actions CI/CD Mid-Level Intermediate

Quick Interview Answer

GitHub Actions is GitHub's automation platform for repository workflows. Workflows can build code, run tests, perform static analysis, package applications, publish artifacts, deploy software, or automate repository tasks.

Detailed Explanation

GitHub Actions is GitHub's automation platform for repository workflows. Workflows can build code, run tests, perform static analysis, package applications, publish artifacts, deploy software, or automate repository tasks.

Workflow definitions are YAML files stored under .github/workflows. They respond to configured events such as pushes, pull requests, schedules, or manual dispatches.

Code Example

# Repository structure
.github/
  workflows/
    build.yml

# Workflows are versioned with the project:
git add .github/workflows/build.yml
git commit -m "Add CI build workflow"
git push