AgentSkillsCN

devops

精通Docker、Docker Compose、GitHub Actions以及Azure Container Apps的部署流程,打造高效的DevOps实践。

SKILL.md
--- frontmatter
name: devops
description: DevOps skill for Docker, Docker Compose, GitHub Actions, and Azure Container Apps deployment pipelines
license: MIT
compatibility: opencode
metadata:
  audience: developers
  workflow: deployment

DevOps Skill

Technologies

  • Docker and Docker Compose
  • GitHub Actions for CI/CD
  • Azure Container Apps for hosting
  • End-to-end deployment pipelines

Docker Best Practices

  • Use multi-stage builds
  • Minimize image size
  • Use specific version tags
  • Implement health checks
  • Run as non-root user
  • Use .dockerignore properly

GitHub Actions

  • Use matrix builds for testing
  • Implement caching strategies
  • Use secrets for sensitive data
  • Add status checks
  • Implement branch protection rules

Azure Container Apps

  • Configure scaling rules
  • Set up revision management
  • Implement ingress configuration
  • Use managed identity
  • Configure container registries
  • Create end-to-end deployment pipelines

Before Implementation

  1. Use context7 to look up service documentation
  2. Use gh_grep to find workflow examples
  3. Check for deprecated actions/features
  4. Review resource limits and quotas

Pipeline Structure

  1. Build stage - compile and test
  2. Security scan - vulnerability checks
  3. Deploy staging - preview environment
  4. Integration tests - E2E testing
  5. Deploy production - with rollback capability

CI/CD Workflows

  • Automated testing on pull requests
  • Automatic deployments on merge to main
  • Environment-specific configurations
  • Proper secrets management
  • Notification on failures