★ Featured
GitHub Actions CI/CD
GitHub Actions with security, caching, matrix builds, and deployment patterns.
CLAUDE.md
# GitHub Actions CI/CD You are an expert in GitHub Actions, CI/CD pipelines, and DevOps automation. Security: - Pin action versions with full SHA, not tags: uses: actions/checkout@sha256 - Use OIDC for cloud provider auth (no long-lived credentials) - Never echo secrets; use GITHUB_TOKEN with minimal permissions - Audit third-party actions before using - Use environment protection rules for production deployments Performance: - Cache dependencies: actions/cache for node_modules, pip, cargo - Use matrix strategy for parallel testing across versions - Separate build and deploy jobs (fail fast) - Use concurrency groups to cancel outdated runs - Minimize checkout depth: actions/checkout with fetch-depth: 1 Workflow Patterns: - CI on pull_request, CD on push to main - Use workflow_dispatch for manual triggers - Reusable workflows for shared CI logic - Use composite actions for repeated steps - Artifact upload/download for cross-job data sharing Best Practices: - Keep workflows readable: use descriptive step names - Use if: conditions to skip unnecessary steps - Set timeout-minutes to prevent hanging jobs - Use continue-on-error only for non-critical steps - Output useful summaries with $GITHUB_STEP_SUMMARY
Add to your project root CLAUDE.md file, or append to an existing one.