Skip to main content

GitHub Actions

Pronunciation
GIT-hub AK-shunz
Updated 2 min read

Share this page

Send the link, quote the definition with a link back, or show it as a card on your own site.

https://softwaredictionary.org/terms/github-actions

In short

GitHub Actions is GitHub's built-in automation platform: YAML workflows in a repo run tests, builds and deployments on events like a push or pull request.

What is GitHub Actions?

GitHub Actions became generally available in 2019 and turned GitHub into a CI/CD platform. Workflows are YAML files stored in the repository under .github/workflows. Each workflow says when it should run, for example on every push, on pull requests, on a schedule or by hand, and what it should do.

A workflow contains jobs, and each job runs on a runner, a fresh virtual machine with Linux, Windows or macOS that GitHub provides, or a self-hosted machine. A job is a list of steps: shell commands such as npm test, or reusable actions such as actions/checkout to fetch the code. Jobs run in parallel unless one depends on another, and a matrix can run the same job across several versions or operating systems.

Thousands of ready-made actions in the GitHub Marketplace handle common tasks: setting up a language, caching dependencies, publishing packages, deploying to cloud providers or commenting on pull requests. Secrets such as API keys are stored encrypted in the repository settings and passed to the steps that need them.

A common misconception is that GitHub Actions is only for CI. It can automate almost anything triggered by repository events: labeling issues, releasing versions, updating dependencies or publishing documentation. Because third-party actions run with access to your code and secrets, pinning them to a specific version is an important security practice.

At a glance

A GitHub Actions workflow. A push or a pull request triggers the workflow file .github/workflows/ci.yml. It runs two jobs in parallel on fresh runners: lint, with the steps checkout, setup-node, npm ci and npm run lint; and test, with checkout, setup-node, npm ci and npm test. When both pass, the pull request shows a green check and can be merged.pushor pull request.github/workflows/ci.ymljob: linton ubuntu-latestcheckoutsetup-nodenpm cinpm run lintjob: teston ubuntu-latestcheckoutsetup-nodenpm cinpm testjobs run in parallelAll checks passedthe PR can merge
An event starts the workflow; its jobs run in parallel on separate machines, each going through its steps in order, and the result appears on the pull request.

Key takeaways

  • GitHub Actions runs automated workflows inside GitHub.
  • Workflows are YAML files in .github/workflows, triggered by events.
  • Jobs run on GitHub-hosted or self-hosted runners, step by step.
  • Marketplace actions handle common tasks like checkout, caching and deploys.
  • Pin third-party actions to versions, since they can see your code and secrets.

Example

Running tests on every push and pull requestyaml
# .github/workflows/ci.yml
name: CI
on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22
          cache: npm
      - run: npm ci
      - run: npm test

Readers ask

Is GitHub Actions free?

It is free for public repositories on GitHub-hosted runners. Private repositories get a monthly allowance of free minutes, and usage beyond that is billed.

What is a GitHub Actions runner?

The machine that executes a job. GitHub provides hosted runners with Linux, Windows or macOS, and you can also register your own machines as self-hosted runners.

What is the difference between a workflow, a job and a step?

A workflow is the whole automation in one YAML file. It contains jobs, which run on separate runners, and each job is a sequence of steps that run commands or actions.

See also

Sources

Spotted a mistake or something missing on this page?Suggest an edit

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings