GitHub Actions samples: add sidecars to Azure App Service for Linux
Sidecars on Azure App Service let you bolt on capabilities like monitoring, caching, or AI—without changing your main app. The Azure team has added two GitHub Actions sample workflows that make it easy to roll this out on App Service for Linux. (Sidecars on Azure App Service)
What’s in the repo
- For code-based apps (bring-your-own-code):
blessed-sitecontainers-webapp-on-azure.yml
— attaches one or more sidecar containers to a code-based web app. Use this when your main app runs on a built-in Linux stack (Python/Node/.NET/Java/PHP, etc.). - For container-based apps (Web App for Containers):
sitecontainers-webapp-on-azure.yml
— deploys your primary container plus sidecars in the same app. Use this when your main app is already packaged as a container image.
Both samples target App Service for Linux and use the App Service sidecar model.
How the workflows work (at a glance)
- Authenticate to Azure using
azure/login
(OpenID Connect recommended), so you don’t store long-lived secrets. (Microsoft Learn) - Build (if needed) and deploy your app with App Service actions/CLI steps. For containerized flows, you’ll typically push/pull from ACR or another registry. (Microsoft Learn)
- Attach sidecars by applying the App Service sitecontainers configuration alongside your main app/container. (Sidecars scale and lifecycle with your app.) (Microsoft Learn)
Quick start
- Copy the relevant YAML into
.github/workflows/
in your repo. (GitHub) - Set auth: use OIDC with
azure/login
(or a service principal/publish profile if you must). (Microsoft Learn) - Fill in inputs: app name, resource group, and sidecar details (image or extension parameters, env vars/ports).
- Commit & run: trigger on
push
or via Run workflow. - Verify: in the Portal, you’ll see your main app plus the sidecar(s); you can also follow the Linux sidecar tutorial if you’re new to the concept. (Microsoft Learn)
When to use which sample?
- Choose
blessed-sitecontainers-…
if your app runs on a built-in Linux runtime and you want to add sidecars (e.g., telemetry collectors, caches, or AI helpers). (GitHub, Microsoft Learn) - Choose
sitecontainers-…
if your main app is a custom container and you want sidecars next to it (same plan, shared lifecycle). (GitHub, Microsoft Learn)
Customize to fit
These samples are designed to be adapted: tweak triggers, add build/test jobs, point at your container registry, configure environment variables/secrets, or target deployment slots. The underlying docs on App Service + GitHub Actions and custom containers cover advanced options. (Microsoft Learn)
Learn more
- Sidecars overview (why & how): benefits, patterns, and limits. (Microsoft Learn)
- Tutorials: add a sidecar to a Linux app (code-based) or to a custom-container app. (Microsoft Learn)