GitHub Actions workflows are defined in YAML files under .github/workflows/, triggered by events like a push, a pull request, a schedule (cron), or a manual workflow_dispatch trigger -- and jobs run on GitHub-hosted runners (Ubuntu, Windows, macOS) by default, or on your own self-hosted runners if you need specific hardware or network access.
- Use matrix builds to test across multiple language versions or operating systems in parallel from a single workflow definition, rather than duplicating the workflow file
- Pull pre-built actions from the GitHub Marketplace for common tasks (checkout, caching dependencies, publishing artifacts) instead of scripting them from scratch
- Use self-hosted runners only when you genuinely need specific hardware, network access, or software not available on GitHub-hosted runners, since they require you to manage the runner infrastructure yourself
Use cases
Intro
- Set up a GitHub workflow to run tests on push
- Automate approvals for pull requests on GitHub
- Deploy to staging when GitHub CI passes
- Generate release notes automatically on GitHub
- Audit dependency changes within GitHub
- Notify teams via internal channels when GitHub actions fail
- Enforce branch protection policies in GitHub
Closing
