← All insightsBest Practices

Common GitHub Actions mistakes and how to avoid them

CodeWizard Academy · 8 July 2026 · 3 min read · Intermediate

Most GitHub Actions pain is self-inflicted and predictable. Here are the mistakes we see most, and the fix for each.

Mistake 1: Using un-pinned third-party actions (tag can move under you) - pin to a SHA

Fix: Pin actions to a commit SHA and review third-party actions before use. Make it the default in your templates and enforce it in review or CI so the mistake cannot come back.

Mistake 2: Storing cloud keys as secrets instead of using OIDC

Fix: Use OIDC for cloud auth and set minimal permissions blocks. Make it the default in your templates and enforce it in review or CI so the mistake cannot come back.

Mistake 3: Over-broad GITHUB_TOKEN permissions; scope them per job

Fix: Cache dependencies and split long jobs with a matrix. Make it the default in your templates and enforce it in review or CI so the mistake cannot come back.

A safer baseline

A CI workflow with caching and a matrix build.

yaml
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 test

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.

Like where this is going?

Get hands-on help from the engineers who write these posts.

Book a free consult