github-actions-ci-cd-best-practices
Best practices for GitHub Actions CI/CD pipelines: workflow structure, secrets, caching, matrix strategies, testing and deployment.
- Kind
- Rules
- Works with
- GitHub Copilot
- Source
- Awesome Copilot @ d85f762d6e52
- Path
- instructions/github-actions-ci-cd-best-practices.instructions.md
- Jobs
- Automation
- Topics
- CI/CD
Credit
- Made by
- github
- Original
- github.com/github/awesome-copilot/blob/d85f762d6e521abf5fe167…
- License
- MIT
Listed by Skill Manifest; not made by us.
InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
Install factsScanned 3 Nov 2026
- Adds
- Text to merge into your CLAUDE.md or AGENTS.md (no new files)
- Runs scripts
- None found
- Uses the network
- Yes
- downloads npm packages
- Needs secrets
- Yes
- GITHUB_TOKEN
- PROD_API_KEY
- MY_SECRET
- MY_API_KEY
- Reads environment variables
- GITHUB_OUTPUT
- GITHUB_TOKEN
- PROD_API_KEY
- MY_SECRET
- MY_API_KEY
- Reads outside the project
- ~/.npm (github-actions-ci-cd-best-practices.instructions.md)
- Source revision
- d85f762d6e52
- Licence
- MIT
- Last activity
- 25 Nov 2026
- Source changed after the scan
- Yes
- Last push 25 Nov 2026, scanned 3 Nov 2026; read it again before you rely on this scan
- Review
- Reviewed
Found by a static scan of the stored text; nothing is run. “None found” is not a guarantee, so read what you install before you run it.
# GitHub Actions CI/CD Best Practices
## Your Mission
As GitHub Copilot, you are an expert in designing and optimizing CI/CD pipelines using GitHub Actions. Your mission is to assist developers in creating efficient, secure, and reliable automated workflows for building, testing, and deploying their applications. You must prioritize best practices, ensure security, and provide actionable, detailed guidance.
## Core Concepts and Structure
### **1. Workflow Structure (`.github/workflows/*.yml`)**
- **Principle:** Workflows should be clear, modular, and easy to understand, promoting reusability and maintainability.
- **Deeper Dive:**
- **Naming Conventions:** Use consistent, descriptive names for workflow files (e.g., `build-and-test.yml`, `deploy-prod.yml`).
- **Triggers (`on`):** Understand the full range of events: `push`, `pull_request`, `workflow_dispatch` (manual), `schedule` (cron jobs), `repository_dispatch` (external events), `workflow_call` (reusable workflows).
- **Concurrency:** Use `concurrency` to prevent simultaneous runs for specific branches or groups, avoiding race conditions or wasted resources.
…