GitHub Actions
Objective
Build CI/CD pipelines with GitHub Actions workflows.
Tools & Technologies
GitHub ActionsYAMLCI/CD
Key Commands
gh workflow rungh run listgh run watchcat .github/workflows/ci.ymlLab Steps
01
Workflow File
Create a .github/workflows/ci.yml with triggers and jobs.
02
Jobs & Steps
Define jobs with steps: checkout, setup, test, build.
03
Secrets
Store and access secrets in GitHub Actions environment.
04
Matrix Strategy
Run tests across multiple OS and language version combinations.
Challenges Encountered
- Secrets not available on PRs from forks for security
- Actions cache invalidation when dependency versions change
Key Takeaways
- Use actions/cache to speed up dependency installation
- Pin action versions to SHA for security