GitHub Actions is a CI/CD platform that automates software development workflows such as building, testing, and deploying applications. It allows workflows to run automatically in response to events in a GitHub repository.
- Automates build, test, and deployment processes.
- Workflows can run when events such as pushes, pull requests, or issues occur.
- Automatically build and test code changes before they are merged.
- Deliver or deploy validated code to the required environment.
- Automate tasks such as labeling issues, checking pull requests, and publishing releases.
- Workflows are defined using YAML files stored in the repository.
Architecture
To understand GitHub Actions, you must understand its hierarchy. It follows a specific flow:

- Event is something happens (e.g., a Push).
- Workflow is the automated process triggers.
- Job is a set of tasks running on a specific server (Runner).
- Step is a single task inside a job (e.g., "Install Python").
- Action is a pre-built script used within a step.
The 5 Core Components
1. Workflows
A workflow is the configurable unit of automation. It is defined in a YAML file stored in your repository at .github/workflows/.
- Analogy: The "Recipe" for your automation.
2. Events (The Triggers)
An event is what starts the workflow. You can trigger workflows on almost anything:
- push: When code is pushed.
- pull_request: When a PR is opened.
- schedule: Run at a specific time (e.g., "Every Monday at 9 AM").
- workflow_dispatch: A button to manually run the workflow.
3. Jobs
A job is a collection of steps that performs a specific task.
- Jobs can run in parallel by default.
- Use
needsto create dependencies between jobs.
4. Runners
A runner is the server that actually executes your code.
- GitHub-Hosted Runners is a virtual machines managed by GitHub (Ubuntu, Windows, macOS). They are fresh for every job and discarded afterwards.
- Self-Hosted Runners can connect your own physical server to GitHub Actions if you need specific hardware (e.g., a GPU for ML tasks).
5. Steps
Steps are individual tasks executed within a job.
run– Executes shell commands.uses– Runs a reusable action.
steps:
- uses: actions/checkout@v4
- run: npm install
- run: npm test6. Actions
Actions are reusable components that perform specific tasks within workflow steps.
- Reduce the need to write repetitive scripts.
- Available through the GitHub Marketplace.
- Examples include checking out code, setting up programming languages, and authenticating with cloud services.

