Comments (2)
Hi @jscarle - right now, we don't have a way to deploy sidecars with Github Actions. However, we are working on this and you should have the functionality in a few months.
In the meanwhile, you can deploy your app using an ARM template. Here is an example https://github.com/Azure-Samples/appservice-linux-sidecar/blob/main/nginx-sample/armtemplatemultictr.json
from webapps-deploy.
For anyone else who comes across this issue and is looking for the same answer as I was, this is how you can update your existing Web App using a GitHub Action.
// update-deployment.yml
permissions:
contents: read
id-token: write
jobs:
update-deployment:
name: Update Deployment
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Login to Azure
uses: azure/login@v2
with:
creds: {credentials}
- name: Deploy Azure Resource Manager template
uses: azure/arm-deploy@v2
with:
deploymentName: {deployment}
deploymentMode: Incremental
scope: resourcegroup
resourceGroupName: {resourcegroup}
template: ./update-deployment.json
parameters: webAppName={webAppName} mainImage={mainImage} sidecarA={sidecarA}
Replace the following placeholders with your values:
{credentials}
=> The Azure Credentials JSON, see https://github.com/Azure/login
{deployment}
=> Any name you can to give to your deployment, restricted to the same rules as a resource group name. update-app
for example.
{resourcegroup}
=> The name of the resource group that contains the Web App.
{webAppName}
=> The name of the web app that you want to update.
{mainImage}
=> The registry, image name, and tag you want to set the image to. contoso.azurecr.io/app/app-main:latest
for example.
{sidecarA}
=> The image you want for the first sidecar. The template is written with conditionals so all sidecars are optional. The maximum you can configure are 4 sidecars as per Azure limits.
This is the ARM template:
// update-deployment.json
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"webAppName": {
"type": "string",
"metadata": {
"description": "The name of the Web App"
}
},
"mainImage": {
"type": "string",
"metadata": {
"description": "The main image to set"
}
},
"sidecarAImage": {
"type": "string",
"metadata": {
"description": "The first sidecar image to set"
},
"defaultValue": ""
},
"sidecarBImage": {
"type": "string",
"metadata": {
"description": "The second sidecar image to set"
},
"defaultValue": ""
},
"sidecarCImage": {
"type": "string",
"metadata": {
"description": "The third sidecar image to set"
},
"defaultValue": ""
},
"sidecarDImage": {
"type": "string",
"metadata": {
"description": "The fourth sidecar image to set"
},
"defaultValue": ""
}
},
"resources": [
{
"type": "Microsoft.Web/sites/sitecontainers",
"apiVersion": "2023-12-01",
"name": "[format('{0}/{1}', parameters('webAppName'), 'main')]",
"properties": {
"image": "[parameters('mainImage')]",
"isMain": true
}
},
{
"condition": "[not(empty(parameters('sidecarAImage')))]",
"type": "Microsoft.Web/sites/sitecontainers",
"apiVersion": "2023-12-01",
"name": "[format('{0}/{1}', parameters('webAppName'), 'sidecarA')]",
"properties": {
"image": "[parameters('sidecarAImage')]",
"isMain": false
}
},
{
"condition": "[not(empty(parameters('sidecarBImage')))]",
"type": "Microsoft.Web/sites/sitecontainers",
"apiVersion": "2023-12-01",
"name": "[format('{0}/{1}', parameters('webAppName'), 'sidecarB')]",
"properties": {
"image": "[parameters('sidecarBImage')]",
"isMain": false
}
},
{
"condition": "[not(empty(parameters('sidecarCImage')))]",
"type": "Microsoft.Web/sites/sitecontainers",
"apiVersion": "2023-12-01",
"name": "[format('{0}/{1}', parameters('webAppName'), 'sidecarC')]",
"properties": {
"image": "[parameters('sidecarCImage')]",
"isMain": false
}
},
{
"condition": "[not(empty(parameters('sidecarDImage')))]",
"type": "Microsoft.Web/sites/sitecontainers",
"apiVersion": "2023-12-01",
"name": "[format('{0}/{1}', parameters('webAppName'), 'sidecarD')]",
"properties": {
"image": "[parameters('sidecarDImage')]",
"isMain": false
}
}
]
}
from webapps-deploy.
Related Issues (20)
- README doesn't have a v3 example or explanation of the differences HOT 4
- Add sample(s) for OIDC HOT 1
- Azure Web App deployment from .zip fails after successfully deploying the content HOT 2
- V3 using node.js 16 upgrade to node.js 20 seeing 16 is deprecated HOT 16
- Deploy to web app does not working for .NET 8 and Linux based deployment - azure/webapps-deploy@v3 HOT 4
- Microsoft Azure Build and deploy PHP app to Azure Web App: Laravel App - Unable to create lockable file HOT 2
- Deployment Faile***, Error: Resource azwb********-tot doesn't exist. HOT 5
- The new option Clean should have defaulted to false or been highlighted as a breaking change HOT 4
- Azure Web Application not updated, action still claims "Success" HOT 9
- Can't deploy to ACA-based Function App
- Cann't show submit messages, ONLY show OneDeploy
- Parameter ''using: node20' is not supported, use 'docker', 'node12' or 'node16' instead.'
- nodes
- util_1.promisify is not a function HOT 4
- Long deployment urls are cut off for slots HOT 1
- update
- Central Directory corrupt error when deploying zip with WEBSITE_RUN_FROM_PACKAGE = 1 on linux
- Please upgrade the SQlite version on the default Python images
- Temp files to delete
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webapps-deploy.