Chapter 9: GitHub Actions Hands-On
9.1 Why Actions — checks on every push
In short: GitHub Actions is one popular motor for that conveyor when your code already lives on GitHub.
Chapter 8 drew the conveyor. GitHub Actions is one popular motor for that conveyor when your code already lives on GitHub.
A workflow is a YAML file under .github/workflows/. An event (push, pull request, schedule…) starts a job on a runner (often a GitHub-hosted Ubuntu VM). Jobs contain steps — checkout, setup language, run tests, build image.
Why it matters for an Instagram-style badge API : every PR that touches the badge API should prove tests still pass before merge, and every merge to main should produce a clearly tagged image you can deploy.
| Manual | Actions |
|---|---|
| "Did you run tests?" | Required check on the PR |
| Build on a laptop only | Same build steps in Git |
| Password in chat | Repository Secrets |
Ravindra Bagale's Tip
Docker Hub / GHCR password plain YAML madhe — bilkul nako. Settings → Secrets and variables → Actions. YAML madhe fakt ${{ secrets.NAME }}. Dhyan rakho!