mirror of
https://github.com/okieselbach/AutopilotMonitor.git
synced 2026-10-24 20:53:06 +00:00
dd39205486
Cross-tenant re-claim of recently deleted global names is denied by Azure by design (dangling-DNS/subdomain-takeover protection). New tenant resources therefore use eu-suffixed names; the old names live on in the old subscription (storage 'autopilotmonitor' recreated as legacy bootstrap-URL keepalive, FuncApp/ACR kept as tombstones). - API base URL -> autopilotmonitor-api-eu.azurewebsites.net (Shared Constants, web CSP + /go fallback, MCP default) - Agent blob container + build counter -> autopilotmonitoreu - deploy-backend app-name, deploy-mcp ACR -> eu names - Bootstrap script URLs stay on the legacy storage (customers migrate once to a domain alias later) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
49 lines
1.5 KiB
YAML
49 lines
1.5 KiB
YAML
name: Deploy MCP Server (Container App)
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
id-token: write # OIDC federated login (secret-less)
|
|
contents: read
|
|
|
|
env:
|
|
ACR_NAME: autopilotmonitoreuacr
|
|
CONTAINER_APP_NAME: autopilotmonitor-mcp
|
|
RESOURCE_GROUP: ${{ secrets.AZURE_MCP_RESOURCE_GROUP }}
|
|
IMAGE_TAG: ${{ github.sha }}
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
name: Build and Deploy MCP Server
|
|
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
|
|
- name: Login to Azure (OIDC)
|
|
uses: azure/login@v3
|
|
with:
|
|
client-id: ${{ secrets.AZURE_CLIENT_ID }}
|
|
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
|
|
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
|
|
|
|
- name: Login to ACR
|
|
run: az acr login --name ${{ env.ACR_NAME }}
|
|
|
|
- name: Build and push container image
|
|
run: |
|
|
docker build \
|
|
-f src/McpServer/autopilot-monitor-mcp/Dockerfile \
|
|
-t ${{ env.ACR_NAME }}.azurecr.io/${{ env.CONTAINER_APP_NAME }}:${{ env.IMAGE_TAG }} \
|
|
-t ${{ env.ACR_NAME }}.azurecr.io/${{ env.CONTAINER_APP_NAME }}:latest \
|
|
.
|
|
docker push ${{ env.ACR_NAME }}.azurecr.io/${{ env.CONTAINER_APP_NAME }} --all-tags
|
|
|
|
- name: Deploy to Container App
|
|
run: |
|
|
az containerapp update \
|
|
--name ${{ env.CONTAINER_APP_NAME }} \
|
|
--resource-group ${{ env.RESOURCE_GROUP }} \
|
|
--image ${{ env.ACR_NAME }}.azurecr.io/${{ env.CONTAINER_APP_NAME }}:${{ env.IMAGE_TAG }}
|