Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/azure-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deploy to Azure with azd

on:
workflow_dispatch:
push:
branches: [ main ]

# Set up permissions for deploying with secretless Azure federated credentials
# https://learn.microsoft.com/azure/developer/github/connect-from-azure?tabs=azure-portal%2Clinux#set-up-azure-login-with-openid-connect-authentication
permissions:
id-token: write
contents: read

jobs:
build:
runs-on: ubuntu-latest
env:
AZURE_CLIENT_ID: ${{ vars.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ vars.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }}
AZURE_ENV_NAME: ${{ vars.AZURE_ENV_NAME }}
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Install azd
uses: Azure/setup-azd@v2

- name: Log in with Azure (Federated Credentials)
run: |
azd auth login \
--client-id "$AZURE_CLIENT_ID" \
--federated-credential-provider "github" \
--tenant-id "$AZURE_TENANT_ID"
shell: bash

- name: Provision Infrastructure
run: azd provision --no-prompt

- name: Deploy Application
run: azd deploy --no-prompt
7 changes: 7 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ These scripts are automatically run by `azd provision` via the `azure.yaml` post
- Uses: uv for setup, requires models: read permission
- Sets: `API_HOST=github`, `GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}`, `GITHUB_MODEL=openai/gpt-4o-mini`

**`azure-dev.yml` - Azure Infrastructure Provisioning and Deployment:**
- Runs on: push to main, workflow_dispatch
- Provisions and deploys Azure infrastructure using Azure Developer CLI (azd)
- Uses: Azure federated credentials (OIDC) for authentication
- Required variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_SUBSCRIPTION_ID`, `AZURE_ENV_NAME`, `AZURE_LOCATION`
- Steps: checkout, install azd, login with federated credentials, provision infrastructure, deploy application

### Dev Container Files (.devcontainer/)

- `.devcontainer/devcontainer.json` - Default dev container (Azure OpenAI setup with azd)
Expand Down