This document describes the current GitHub Actions deployment behavior for ai-gateway.
- PRs from forks are skipped for deployment-related jobs (no repo secrets).
- PRs targeting
devrunplan+deploy-dev. - PRs targeting
mainrun staging only when the PR has labelrun-staging. - Push to
mainandworkflow_dispatchrunplan+deploy-prod.
staging deployment for PRs to main is controlled by PR label:
- Add label
run-stagingto enabledeploy-stagingfor that PR. - Remove label
run-stagingto disable staging for that PR.
The composite action .github/actions/smoke-test-gateway performs:
GET /v1/modelsdiagnostics.POST /v1/embeddingsandPOST /v1/responseswith retries.- Candidate probing for embeddings if the requested model fails.
- Azure OpenAI deployment discovery fallback using configured endpoint/key when needed.
Additionally, when STATE_SERVICE_CONTAINER_IMAGE is configured, deploy.yaml runs state-service smoke checks via dashboard proxy endpoints:
GET /api/state/catalogPUT /api/state/selectionGET /api/state/selection
These checks validate state-service availability and write/read behavior after deploy.
- State-service ingress defaults to internal-only in Terraform (
state_service_external_enabled = false). - When
STATE_SERVICE_SHARED_TOKENis set, dashboard proxy injectsX-State-Service-Tokenand state-service rejects requests without a valid token.
When STATE_SERVICE_CONTAINER_IMAGE points to a private ghcr.io image, deploy jobs pass registry credentials into Terraform so Azure Container Apps can pull the image:
STATE_SERVICE_REGISTRY_PASSWORD(GitHub environment secret; token withread:packages)STATE_SERVICE_REGISTRY_USERNAME(GitHub variable; optional, defaults to repository owner)
If these are missing for a private image, Azure Container Apps (ACA) revision provisioning may fail with UNAUTHORIZED: authentication required.
- Requested models are used first.
- If
/v1/modelsreturns model IDs, gateway-compatible IDs are preferred. - Azure OpenAI deployment IDs are considered as fallback candidates.
- Responses-model fallback does not overwrite a model already valid in gateway
/v1/models.
In deploy-prod, quickcheck enforces endpoint host consistency:
AZURE_OPENAI_ENDPOINThost must bemys-prod-ai-san.cognitiveservices.azure.com.- Mismatch fails fast before apply/smoke test.
- Workflow:
.github/workflows/deploy.yaml - Smoke test action:
.github/actions/smoke-test-gateway/action.yml - Secrets guidance: SECRETS.md
- OIDC guidance: AZURE_OIDC_SETUP.md