Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk5 min

What to Know About Deploying a Foundry Agent with GitHub Actions

A practical guide to deploying Microsoft Foundry hosted-agent code with GitHub Actions, scoping Azure OIDC access, and understanding what a post-deployment smoke test proves.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

GitHub Actions can continuously deploy code for an existing Microsoft Foundry hosted agent and then run a smoke test against the deployed agent. The documented pattern uses Azure Developer CLI (azd) and GitHub OpenID Connect (OIDC) so the workflow can authenticate to Azure without a long-lived Azure credential stored as a GitHub secret. It does not provision an entire Foundry environment from scratch, and a non-empty smoke-test response is not proof that the agent is correct or production-ready.

What the GitHub Actions pipeline does

Microsoft’s hosted-agent CI/CD quickstart describes a pipeline with two tasks: deploy updated hosted-agent code, then invoke the deployed agent to check that it returns a response. The template uses azd to select the project environment, deploy the agent, report deployment status, and send a smoke-test message. It is intended for a project and hosted agent that have already been provisioned and deployed successfully once.

As an Amazon Associate I earn from qualifying purchases.

That distinction matters: use the workflow to automate subsequent code deployments, not as a substitute for the initial setup of the Foundry project and its cloud resources. Microsoft’s guidance is specifically about hosted agents. Managed prompt agents and voice-based prompt agents have different deployment needs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Prepare the hosted-agent project

The own-code quickstart supports Python and .NET hosted-agent code. It lists frameworks including Microsoft Agent Framework, LangGraph, GitHub Copilot SDK, and OpenAI Agents SDK, as well as custom code that calls a model directly. The documented prerequisites include an Azure subscription, an authenticated azd session, Azure Developer CLI 1.27.1 or later, and the Microsoft Foundry azd extension. The Python path lists Python 3.13 or later; the C# path lists .NET 10 SDK or later. These are version-sensitive requirements, so check the current quickstart before setting up a new development environment: Microsoft Foundry hosted-agent CI/CD quickstart and hosted-agent quickstart.

Choose how to package the agent

For source-code deployment, Microsoft documents uploading a ZIP for Python or .NET; the platform can build dependencies or use dependencies bundled with the upload. azd and the Foundry VS Code toolkit automate packaging, upload, status polling, and role configuration. Choose a container when the team needs control over the runtime image or already maintains a Dockerfile. Container deployment adds image-build and registry access requirements to the identity permissions.

Set up OIDC and scope Azure access

Create or configure a Microsoft Entra application with a federated credential that trusts the intended GitHub Actions workflow. The workflow requests an OIDC token rather than relying on a stored, long-lived Azure credential. GitHub’s id-token: write permission allows the job to request that token; by itself, it does not grant the job permission to change Azure resources. The cloud-side trust policy must include at least one condition, so an untrusted repository cannot use it to request access tokens.

For source-code deployment, Microsoft’s quickstart specifies the Foundry User role and Contributor role on the target Foundry project. Container deployment also needs the Azure RBAC permissions required to build, push, and deploy the image and access related resources. Confirm the current role scope and project-specific requirements before assigning access. See Microsoft’s role and identity setup and GitHub’s OIDC configuration for Azure.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep workflow permissions and trust narrow

  • Grant only the GitHub permissions the workflow or job needs. The Microsoft template includes contents: read and id-token: write; treat these as template choices to adapt to repository policy.
  • Constrain the federated credential to the intended repository and branch, tag, or deployment environment. Avoid trust rules broad enough to authorize unrelated workflows.
  • Use GitHub deployment-environment protection rules where appropriate to limit which branches or tags can deploy or access environment secrets.
  • Review third-party actions and workflow changes through the same controls used for other production-sensitive code.

GitHub’s guidance explains OIDC and workflow hardening at OIDC security hardening and secure use of GitHub Actions.

Configure and run the deployment workflow

Start from Microsoft’s hosted-agent workflow template, then adapt its triggers and configuration to your repository. The quickstart shows a push to the main branch and a manual trigger. Those are examples, not requirements for every team. Store non-secret project configuration as repository variables and put any required application secrets in the appropriate GitHub secret or protected environment. Keep Azure authentication on OIDC rather than adding a long-lived Azure client credential.

  1. Complete the initial deployment. Provision the Foundry project and deploy the hosted agent successfully before relying on the CI/CD workflow.
  2. Configure the federated identity. Add a Microsoft Entra federated credential whose trust conditions match the intended GitHub repository and workflow context, then assign the Azure roles required for the chosen deployment method.
  3. Add workflow configuration. Set the project environment and other non-secret values as repository variables; configure required application secrets separately. Grant the job only the needed GitHub permissions, including OIDC token access.
  4. Deploy with azd. Have the workflow select the configured project environment and deploy the agent code. Retain the template’s status reporting so a failed deployment is visible before testing.
  5. Invoke the deployed agent. Send a safe, deterministic smoke-test prompt that should produce a response without requiring unpredictable external data or side effects.
  6. Fail on an empty response. Treat a missing or empty reply as a failed smoke test and fail the workflow. A non-empty reply shows that the basic invocation path returned something; it does not establish that the content is correct.

Interpret the smoke test correctly

A smoke test answers a narrow operational question: after deployment, can the workflow invoke the hosted agent and receive a response? Checking for an empty result can catch a broken deployment or invocation path. It cannot, on its own, verify factual accuracy, instruction-following, safety, tool behavior, latency, or performance across a representative set of user tasks. The quickstart describes this basic response check, not a full agent evaluation. Build broader evaluation separately if the release decision depends on quality or safety criteria.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Choose the delivery tools that fit the team

Microsoft’s Azure Developer CLI CI/CD guide covers GitHub Actions and Azure DevOps, and infrastructure options including Bicep and Terraform. Choose GitHub Actions or Azure DevOps based on where the repository and existing delivery process live. Choose Bicep or Terraform based on the team’s infrastructure workflow and familiarity; the guide also includes Terraform state setup guidance. Review the guide’s preview notices feature by feature: some content is identified as public preview, without a service-level agreement and not recommended for production workloads. That warning should not be generalized to every Foundry feature. Check the current status before adopting a preview capability: Azure Developer CLI CI/CD guidance.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.