Add session_id field to AssistantMessageOut schema. (#41) #31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy to Kubernetes | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| env: | |
| REGISTRY: crretoxmas2024.azurecr.io | |
| NAMESPACE: reto-xmas-2025-goland-ia-backend | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| service: | |
| - name: docs-manager | |
| path: ./DocsManager | |
| image: reto-xmas-2025-goland-ia-backend-docs-manager | |
| deployment: docs-manager | |
| - name: rag-manager | |
| path: ./RAGManager | |
| image: reto-xmas-2025-goland-ia-backend-rag-manager | |
| deployment: rag-manager | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to ACR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ secrets.ACR_USERNAME }} | |
| password: ${{ secrets.ACR_PASSWORD }} | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: ${{ matrix.service.path }} | |
| platforms: linux/amd64 | |
| push: true | |
| tags: | | |
| ${{ env.REGISTRY }}/${{ matrix.service.image }}:latest | |
| ${{ env.REGISTRY }}/${{ matrix.service.image }}:${{ github.sha }} | |
| cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ matrix.service.image }}:buildcache | |
| cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ matrix.service.image }}:buildcache,mode=max | |
| - name: Set up kubectl | |
| uses: azure/setup-kubectl@v3 | |
| with: | |
| version: 'latest' | |
| - name: Configure kubectl | |
| run: | | |
| mkdir -p $HOME/.kube | |
| echo "${{ secrets.KUBECONFIG }}" | base64 -d > $HOME/.kube/config | |
| chmod 600 $HOME/.kube/config | |
| - name: Restart deployment | |
| run: | | |
| kubectl rollout restart deployment/${{ matrix.service.deployment }} -n ${{ env.NAMESPACE }} | |
| kubectl rollout status deployment/${{ matrix.service.deployment }} -n ${{ env.NAMESPACE }} --timeout=5m | |
| - name: Verify deployment | |
| run: | | |
| echo "✅ Deployment successful for ${{ matrix.service.name }}" | |
| kubectl get pods -n ${{ env.NAMESPACE }} -l app=${{ matrix.service.deployment }} | |
| - name: Deployment Summary | |
| if: always() | |
| run: | | |
| echo "### 🚀 Deployment Summary" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "**Service:** ${{ matrix.service.name }}" >> $GITHUB_STEP_SUMMARY | |
| echo "**Image:** ${{ env.REGISTRY }}/${{ matrix.service.image }}:${{ github.sha }}" >> $GITHUB_STEP_SUMMARY | |
| echo "**Status:** ${{ job.status }}" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "#### Pods:" >> $GITHUB_STEP_SUMMARY | |
| echo '```' >> $GITHUB_STEP_SUMMARY | |
| kubectl get pods -n ${{ env.NAMESPACE }} -l app=${{ matrix.service.deployment }} >> $GITHUB_STEP_SUMMARY | |
| echo '```' >> $GITHUB_STEP_SUMMARY | |
| notify-success: | |
| name: Deployment Success | |
| runs-on: ubuntu-latest | |
| needs: [build-and-deploy] | |
| if: success() | |
| steps: | |
| - name: Success Summary | |
| run: | | |
| echo "### ✅ Deployment Successful!" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "All services deployed successfully:" >> $GITHUB_STEP_SUMMARY | |
| echo "- 🌐 DocsManager: https://goland-ia-backend-docs-manager.reto-ucu.net" >> $GITHUB_STEP_SUMMARY | |
| echo "- 🌐 RAGManager: https://goland-ia-backend-rag-manager.reto-ucu.net" >> $GITHUB_STEP_SUMMARY |