โ—€ Playbook index
NO.19.2

GitHub Actions

Updated: 2026-09-11

In a nutshell

GitHub Actions is a continuous integration and continuous delivery (CI/CD) platform.

But it goes beyond just DevOps: run workflows when any event happens in your repository โ€” push, PR, issue, label, schedule, and more. It's automation for almost anything.

What workflow does it automate?

Beyond CI/CD, GitHub Actions can automate every stage of the SDLC, all triggered by events.

GitHub Actions across the whole SDLC (Plan, Code, Build, Test, Release, Deploy, Operate, Monitor)

The metrics it improves (DORA)

The point of automation (CI/CD, tests, reviews) is to raise both speed and stability. The yardstick is the four DORA metrics โ†— โ€” push them toward Elite.

DORA metric๐ŸŸข Elite๐ŸŸฃ High๐ŸŸ  Medium๐Ÿ”ด Low
๐Ÿš€ Deployment frequencyMultiple times/dayOnce/dayโ€“once/weekOnce/weekโ€“once/monthOnce/monthโ€“once/6 months
โฑ๏ธ Lead time for changes< 1 day1 dayโ€“1 week1 weekโ€“1 month1 monthโ€“6 months
โŒ Change failure rate0โ€“15%0โ€“15%0โ€“15%46โ€“60%
๐Ÿ”ง Mean time to recovery< 1 hour< 1 day< 1 day1 weekโ€“1 month

๐ŸŽฏ Automationโ€™s value: raise speed (frequency, lead time) and stability (failure rate, recovery) at the same time.

Architecture: clone โ†’ run โ†’ destroy

Your GitHub repo is cloned onto a disposable cloud VM; steps (like tests) run there, results are sent back, and the VM is destroyed.

flowchart LR
  REPO["๐Ÿ™ GitHub<br/>๐Ÿ“ฆ Repository"]
  VM["โ˜๏ธ Runner VM<br/>fresh &amp; disposable"]
  RUN["โ–ถ๏ธ Run steps<br/>โœ… test ยท ๐Ÿ—๏ธ build"]
  GONE["๐Ÿ’ฅ VM destroyed"]
  REPO -->|โ‘  event triggers| VM
  VM -->|โ‘ก clone repo| RUN
  RUN -->|โ‘ข send results back| REPO
  RUN -->|โ‘ฃ job ends| GONE

  classDef gh fill:#0a0e27,stroke:#00f0ff,color:#00f0ff,stroke-width:2px
  classDef vm fill:#1a0a2e,stroke:#ffb000,color:#ffb000,stroke-width:2px
  classDef run fill:#0a1a14,stroke:#9bbc0f,color:#9bbc0f,stroke-width:2px
  classDef gone fill:#2a0a0a,stroke:#ff5555,color:#ff5555,stroke-width:2px
  class REPO gh
  class VM vm
  class RUN run
  class GONE gone

๐Ÿ” Results return as checks, logs, and artifacts; the VM is discarded every run.

How it works (core concepts)

Itโ€™s very simple: when an event fires, borrow a clean VM, clone the repo, and run the steps you wrote โ€” in order.

  • ๐Ÿ“ Location โ€” .github/workflows/*.yml (multiple files supported)
  • โšก Triggers โ€” push / pull_request / schedule (cron) / workflow_dispatch (manual) / issues / release and 35+ other events
  • ๐Ÿ–ฅ๏ธ Execution environment โ€” a fresh GitHub-hosted runner (Linux / Windows / macOS VM) starts up per job
  • ๐Ÿ“ฆ Repo cloned every time โ€” actions/checkout full-clones into $GITHUB_WORKSPACE (no state carried over from previous jobs)
  • โฑ๏ธ Time limits โ€” 6 hours max per job, 35 days max per workflow (matrix parallelism is supported)
  • ๏ฟฝ๏ฟฝ Secrets โ€” stored in Settings โ†’ Secrets โ†’ referenced as ${{ secrets.NAME }} (masked in logs)

๐Ÿง  โ€œStart from scratch every timeโ€ is the golden rule of GitHub Actions. To persist state, use actions/cache, artifacts, or rely on already-deployed infrastructure.

GitHub-hosted runners vs Self-hosted runners

Aspect๐ŸŸข GitHub-hosted runner๐Ÿ› ๏ธ Self-hosted runner
ManagementGitHub provides, updates, and discardsYou run it on your own server / VM / k8s
OSLinux / Windows / macOSAnything (Raspberry Pi, on-prem LAN, GPU machines)
NetworkPublic internetDirect access to internal networks / VPN resources
ScaleAuto-starts on demand, unlimited parallelism (within plan limits)You manage capacity
CostTime-based billing (see table below)Runner itself is free (just your own infra costs)
Use caseGeneral CI/CD, OSS, lightweight jobsDedicated hardware, internal resource access, sensitive workloads, huge builds

๐ŸŒ As a middle ground, consider larger runners (high-spec GitHub-hosted) or Actions Runner Controller to run auto-scaling self-hosted runners on k8s.

Reuse components from the Marketplace

You donโ€™t have to write everything from scratch. GitHub Marketplace has 20,000+ reusable actions.

steps:
  - uses: actions/checkout@v4              # GitHub official: clone repo
  - uses: actions/setup-node@v4            # Set up Node.js environment
    with: { node-version: 20 }
  - uses: docker/build-push-action@v5      # Build & push Docker image
  - uses: aws-actions/configure-aws-credentials@v4
  • ๐Ÿท๏ธ Official verified actions โ€” GitHub, AWS, Azure, GCP, Docker, HashiCorp, and other major vendors
  • ๐Ÿ”“ OSS actions โ€” anyone can publish (uses: owner/repo@sha to reference)
  • ๐Ÿ“Œ Always pin versions โ€” commit SHA pins are safer than tags (@v4) against supply chain attacks
  • ๐Ÿ›ก๏ธ Org allowlist โ€” restrict available actions via Settings โ†’ Actions โ†’ Allowed actions

Getting started (fastest path)

Just drop a .github/workflows/ci.yml:

name: CI
on:
  push:        { branches: [main] }
  pull_request:
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: 20 }
      - run: npm ci
      - run: npm test

The moment you push, execution logs appear in the Actions tab. Failures show as โŒ on the PR.

๐Ÿš€ Start with runs-on: ubuntu-latest for everything, then scale out to Windows / macOS / larger runners / self-hosted as needed.

Eligibility and pricing

Public repos get GitHub-hosted runners completely free โ€” only concurrency limits apply. Private repos get a monthly free tier per plan; overages are pay-as-you-go.

Free tier per plan (private repos / month)

PlanActions minutes / monthStorage
Free2,000 min500 MB
Pro3,000 min1 GB
Team3,000 min2 GB
Enterprise50,000 min50 GB

๐Ÿ’ก Free tier counts Linux as 1ร— multiplier. Windows consumes 2ร— and macOS consumes 10ร— โ€” watch out.

Per-OS / per-size unit pricing (overages ยท 2-core standard)

OS / RunnerMultiplierUnit price (USD/min)Notes
Linux 2-core1ร—$0.008Standard, cheapest
Windows 2-core2ร—$0.0162ร— Linux
macOS 3-core10ร—$0.08iOS / Mac builds
Linux 4-core (larger)โ€”$0.016Team / Enterprise
Linux 8-core (larger)โ€”$0.032
Linux 16-core (larger)โ€”$0.064
Linux 64-core (larger)โ€”$0.256Huge builds
GPU runnerโ€”$0.07+ML / inference

๐Ÿ’ฐ Storage overages are $0.25 / GB (artifacts + Actions cache + Packages combined).
๐Ÿ› ๏ธ Self-hosted runners incur no GitHub billing (as of now). Running on your own server / k8s means execution time is free โ€” you just pay for your own infrastructure and electricity.
๐ŸŒ Billing is usage-time-based, not per active committer. Even a solo developer who runs CI heavily will see charges.

Your CI is not the only thing burning minutes ๐Ÿ“– Docs

Alongside the CI/CD you wrote yourself, the headline Copilot and GHAS features run on the same GitHub-hosted runners and turn the same Actions meter.

What spends Actions minutesHow it is billed
๐Ÿค– Cloud AgentEvery task it implements
๐Ÿ‘€ Copilot Code ReviewEvery review on a private repo
๐Ÿ” Code Scanning (CodeQL)Every push, PR and weekly scan
๐Ÿฉบ Code QualityEvery scan it runs
โš™๏ธ Your own CI/CDWhatever your workflows do

A hard budget stops all of it at once

Exhaust a budget that has Stop usage when budget limit is reached ticked and every GitHub-hosted runner halts. It is not just CI going red: CodeQL scanning and Copilot stop in the same instant.

  • โœ… Prefer alert-only โ€” leave the box unticked for a โ€œsoft budgetโ€. Owners and billing managers are emailed at 75 / 90 / 100% and nothing is blocked
  • ๐Ÿ“Š Measure before you cap โ€” github.com/enterprises/<enterprise slug>/actions/metrics/usage breaks minutes down by workflow, repo and OS
  • ๐Ÿ› ๏ธ Self-hosted runners are not billed โ€” the problem never arises there