GitHub Actions runs event-driven workflows (on push, PR, schedule, etc.) defined as YAML in .github/workflows, using reusable 'actions' from the marketplace or your own repos.
Why teams use it
- Zero extra infrastructure - it lives where your code already is
- A marketplace of prebuilt actions for build, test, deploy and scanning
- OIDC lets workflows get short-lived cloud credentials with no stored secrets
Install it
mkdir -p .github/workflows
$EDITOR .github/workflows/ci.yml # workflows are just YAML files in the repoA first working config
A CI workflow with caching and a matrix build.
name: ci
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix: { node: [18, 20, 22] }
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: ${{ matrix.node }}, cache: npm }
- run: npm ci
- run: npm testRun and verify
# Run and debug workflows locally with act
act -j test
gh run watch # follow the latest run from the CLIMistakes to avoid early
- Using un-pinned third-party actions (tag can move under you) - pin to a SHA
- Storing cloud keys as secrets instead of using OIDC
- Over-broad GITHUB_TOKEN permissions; scope them per job
Want senior help putting GitHub Actions to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.