Github Actions

Use when: write or review GitHub Actions workflows that are fast, secure, and maintainable.

kimtth 8c0f741 1.0 KB Updated

File contents

Goal: CI workflows that are quick, least-privileged, and reliable.

Use for:

  • authoring workflows for build, test, and release
  • speeding up slow or flaky Actions runs
  • hardening workflow permissions and secrets

Workflow:

  1. Trigger on the right events with path and branch filters.
  2. Set least-privilege permissions for GITHUB_TOKEN.
  3. Cache dependencies and reuse setup across jobs.
  4. Parallelize with a matrix; fail fast where useful.
  5. Pin third-party actions to a commit SHA.
  6. Use secrets via the secrets context, never echoed.

Practices:

  • minimal permissions block per workflow/job
  • matrix builds for versions and platforms
  • concurrency groups to cancel superseded runs
  • reusable workflows for shared logic

Rules:

  • pin actions by SHA; do not trust mutable tags
  • grant the token the least access needed
  • never print secrets; mask sensitive output
  • keep workflows fast with caching and concurrency control

kimtth/agent-skill-100-lines-or-less/tree/main/skills/github-actions commit 8c0f741b13

Frequently asked questions

npx skillmds@latest add kimtth/github-actions