GitHub Actions
|
This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production. |
GitHub Actions is the automation platform built into GitHub: a workflow, defined
as YAML in .github/workflows/, runs jobs on a runner whenever an event such as a push, a pull request, a tag, a
schedule or a manual dispatch occurs. It is the usual way to build, test, scan and publish a repository hosted on
GitHub. This subsection is a reference for developers who already use Git and GitHub and want to write, secure
and maintain real pipelines: it covers the workflow language first, then the execution model (jobs, runners,
caching), then credentials and deployment, then reuse, hardening and releases.
Version baseline
Checked against the official release feeds and runner-images repository on 2026-11-10.
| Component | Version |
|---|---|
|
Ubuntu 24.04 ( |
|
Windows Server 2025 |
|
macOS 26 (arm64) |
Actions runner application |
2.338.x |
|
v7 |
|
v7 |
|
v6 |
|
v7 |
|
v6 |
|
v7 |
|
v6 |
|
v7 / v8 |
|
v9 |
|
v4 |
|
v6 / v5 / v5 |
|
v4 |
|
v6 |
|
v3 |
|
v3 |
|
v7 |
|
release/v1 |
|
v6 |
|
0.12.0 |
actionlint |
1.7.12 |
Runner images change weekly, so the preinstalled tool versions are not listed here; read the runner-images repository for the image in use. On any discrepancy the current official documentation is the authority.
What’s covered
-
Getting Started with GitHub Actions — the model of events, workflows, jobs, steps and runners, a first workflow, watching runs with the UI and
gh, and the docs site’s own workflow explained. -
Workflow Syntax and Triggers — top-level keys, event filters, schedules, manual and called workflows, contexts, expressions and workflow commands.
-
Jobs, Steps and Matrix Builds — dependencies and outputs between jobs, steps, service containers, matrices and summaries.
-
Runners — GitHub-hosted, larger and self-hosted runners and how to choose.
-
Using and Writing Actions — versioning, the common official actions, and JavaScript, Docker and composite actions.
-
Caching and Artifacts — cache keys and scope, built-in caching of the
setup-*actions, and passing files between jobs. -
Secrets, Variables and OIDC — secrets, variables, the built-in token, and short-lived cloud credentials with OpenID Connect.
-
Environments and Deployment Protection — approvals, branch rules, promotion pipelines and GitHub Pages deployments.
-
Reusable Workflows and Composite Actions —
workflow_call, composite actions and organisation starter workflows. -
Security Hardening — least privilege, SHA pinning, script injection,
pull_request_targetpitfalls and attestations. -
Release Pipelines — tags and releases, and publishing to Maven Central, npm, PyPI, NuGet, GHCR and GitHub Pages.
-
Troubleshooting and Debugging — logs, debug mode, workflows that do not start, and a symptom table.
-
GitHub Actions Cheat Sheet — a one-page quick reference.
Reading path
-
Read Getting Started with GitHub Actions and Workflow Syntax and Triggers to write a first workflow.
-
Continue with Jobs, Steps and Matrix Builds, Runners and Using and Writing Actions for the execution model.
-
Add Caching and Artifacts and Secrets, Variables and OIDC to make pipelines fast and able to reach other systems.
-
Finish with Environments and Deployment Protection, Reusable Workflows and Composite Actions, Security Hardening, Release Pipelines and Troubleshooting and Debugging, and keep the GitHub Actions Cheat Sheet at hand.
Running example
The running example is this documentation site’s own pipeline: the publish workflow in
.github/workflows/publish.yml, which runs every night at 03:00 UTC, installs Node.js and Antora with its
extensions, validates the Mermaid diagrams, builds the site into build/site and pushes it to the gh-pages
branch. A twin workflow, manual_publish, runs the same steps on workflow_dispatch. Each page explains the
existing workflow through its topic and then shows, as a proposal, how it could be improved: more triggers and
concurrency control, an npm cache, least-privilege permissions, SHA-pinned actions, a Pages environment and a shared
reusable workflow.
or manual dispatch"] --> co["checkout"] co --> node["setup-node 24"] node --> inst["install Antora
and extensions"] inst --> val["validate Mermaid"] val --> bld["antora antora-playbook.yml"] bld --> dep["push build/site
to gh-pages"]
Related material on this site
-
Git & GitHub — the parent section: repositories, branches, pull requests and tags and releases, which most release workflows are triggered by.
-
Docker CI/CD with GitHub Actions — building and publishing images.
-
Android CI/CD, Kotlin Multiplatform CI/CD and Windows CI/CD — stack-specific pipelines.
-
NuGet CI release workflows and Node.js workspaces and publishing — package publishing.
-
Antora publishing — the documentation toolchain behind the running example.
Bibliography
One book on continuous integration was found in the library and its table of contents was consulted for the concepts only: Nikhil Pathania, Learning Continuous Integration with Jenkins (Packt, 2017) — the chapters on the concepts and elements of continuous integration (version control, branching strategy, self-triggered builds, code coverage, static analysis, automated testing and packaging). It is about Jenkins, not GitHub Actions, so every syntax, version and example here is compiled from the official documentation listed under References, and on any discrepancy the current official documentation is the authority.