Set up CI/CD
Set up continuous deployment for Blendx apps using GitHub Actions and Azure
Set up continuous deployment for Blendx standalone apps using GitHub Actions.
Prerequisites
- Azure Container App already created and running
- GitHub repository access for secrets configuration
- Azure service principal credentials (or existing credentials from another deployment)
1. Get Required Credentials
Container Registry Credentials
# Get username (usually the registry name)
az acr credential show --name blendappcr --query username -o tsv
# Get password
az acr credential show --name blendappcr --query "passwords[0].value" -o tsv2. GitHub Secrets Configuration
Go to your GitHub repository → Settings → Secrets and variables → Actions → New repository secret
Add the following secrets:
| Secret Name | Description |
|---|---|
AZURE_CREDENTIALS | Azure service principal JSON (see format below) |
CONTAINER_REGISTRY_USERNAME | ACR username (usually blendappcr) |
CONTAINER_REGISTRY_PASSWORD | ACR password from Step 1 |
AZURE_CREDENTIALS Format
{
"clientSecret": "<client-secret>",
"subscriptionId": "<subscription-id>",
"tenantId": "<tenant-id>",
"clientId": "<client-id>"
}These values come from the service principal. If these secrets already exist from another deployment, you can reuse them.
3. GitHub Workflow Setup
Create the file .github/workflows/deploy-azure.yml:
name: Deploy to Azure Container Apps
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
- name: Install dependencies
run: npm install
- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Build and push container image to registry
uses: azure/container-apps-deploy-action@v1
with:
appSourcePath: ${{ github.workspace }}
registryUrl: blendappcr.azurecr.io
registryUsername: ${{ secrets.CONTAINER_REGISTRY_USERNAME }}
registryPassword: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }}
containerAppName: blendx-app
resourceGroup: BLEND.APP
imageToBuild: blendappcr.azurecr.io/blendx-app:${{ github.sha }}
dockerfilePath: Dockerfile4. Deployment Process
Automatic Deployment
Push code to the main branch:
git add .
git commit -m "Your changes"
git push origin mainThe GitHub Action will automatically trigger and deploy.
Manual Deployment
You can also trigger deployments manually from the Actions tab in GitHub using the "Run workflow" button.
Customization
Update these values in the workflow file for your specific app:
| Value | Description |
|---|---|
containerAppName | Your Azure Container App name |
resourceGroup | Your Azure resource group |
imageToBuild | Docker image name with your app name |
registryUrl | Your Azure Container Registry URL |

