Documentation Index
Fetch the complete documentation index at: https://base.bangwu.me/llms.txt
Use this file to discover all available pages before exploring further.
GitHub Actions
GitHub Actions is GitHub’s CI/CD automation tool. It can automatically run workflows for building, testing, deployment, and more. Public repositories are free to use, while private repositories come with a monthly free quota.Basic Concepts
- Workflow: an automated process made up of one or more jobs
- Job(Task):a set of steps executed on the same runner
- Step: a single task, which can be either an action or a shell command
- Action(Action):reusable smallest unit
- Runner: the server that executes the workflow
Basic Syntax
Workflow configuration files use YAML and live in the.github/workflows/ directory.
Simplest workflow
Complete example
Trigger events
Push Event
Pull Request Event
Scheduled tasks
Manual trigger
Common actions
Checkout code
Set up Node.js
Set up Python
CachingDependency
Upload build artifacts
Download build artifacts
Automatically publish a release
Create a release
automatically generates Release Notes
Self-hosted Runner
Self-hosted runners let you run workflows on your own servers.Add a runner
- Go to Repository Settings → Actions → Runners → New self-hosted runner.
- Follow the prompts to install and configure it on your server.
- Start the runner.
Installation(Linux)
Use a self-hosted runner
Label selection
Secrets management
Add a secret
Settings → Secrets and variables → Actions → New repository secretUse a secret
Matrix builds
Conditional execution
Practical examples
Automatically deploy to a server
Build and push Docker images
Code checks
Best Practices
- Use caching to speed up dependency installation.
- Use matrix builds for multi-environment testing.
- Run jobs in parallel when they are independent.
- Use
ifwisely to save resources with conditional execution. - Protect secrets and never print them in logs.
- Prefer official actions because they are more reliable and better maintained.
- Limit permissions and grant only what each workflow needs.
- Have a CI fallback plan — GitHub Actions outages happen regularly; consider self-hosted runners or a secondary CI platform.
Platform Reliability Risk
GitHub Actions has experienced frequent outages in 2025–2026. Mitchell Hashimoto (creator of Vagrant and Terraform, GitHub user #1299 since 2008) announced in April 2026 that his open-source project Ghostty is leaving GitHub, primarily because of persistent CI/CD reliability issues:“I started marking each day with an X if GitHub outages affected my work. Nearly every day had an X.”
When your CI/CD platform has regular outages that block you for hours, it becomes a productivity risk — not just an inconvenience. For serious projects, consider:
- Self-hosted runners as a fallback (see the Self-hosted Runner section above)
- Alternative CI platforms (CircleCI, Buildkite, Gitea Actions)
- Mirror your repo to another platform so you can switch CI quickly
- Don’t couple your entire workflow to one platform’s availability
Mitigation Strategies
- Self-hosted runners — Run workflows on your own infrastructure; unaffected by GitHub outages
- Multi-platform CI — Mirror critical workflows to an alternative (CircleCI, Buildkite)
- Local testing first — Run lint/typecheck/test locally before pushing; CI should be a gate, not a bottleneck
- Cache aggressively — Reduce job duration so outages cause less blocked time
- Read-only GitHub mirror — Keep your source on GitHub for discoverability, but host CI elsewhere
