github-actions-conventions
Installation
SKILL.md
GitHub Actions CI/CD Best Practices
Follow these conventions when creating or modifying GitHub Actions workflows to ensure they are secure, maintainable, and performant.
Core Concepts
Workflow Structure
- Use consistent, descriptive names for workflow files (e.g.,
build-and-test.yml,deploy-prod.yml) - Choose appropriate triggers:
push,pull_request,pull_request_target,workflow_dispatch,schedule,repository_dispatch,workflow_call,workflow_run - Use
concurrencyto prevent simultaneous runs for shared resources - Define
permissionsat workflow level for least privilege (default tocontents: read) - Leverage reusable workflows (
workflow_call) and composite actions to reduce duplication
For detailed guidance and examples, see references/core-concepts.md.