Mục tiêu: Master CI/CD pipeline cho .NET, Docker workflows, và .NET Aspire cho cloud-native development.
1. CI/CD Pipeline Patterns
GitHub Actions cho .NET
yaml# .github/workflows/ci-cd.yml
name: CI/CD Pipeline
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
env:
DOTNET_VERSION: '9.0.x'
REGISTRY: myregistry.azurecr.io
IMAGE_NAME: order-service
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET