Skip to content

Demo application for Azure Container Apps GitHub Action

Notifications You must be signed in to change notification settings

kasunsjc/aca-github-cicd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Creating a CI/CD pipeline for Azure Container Apps

Create a Container Apps

RESOURCE_GROUP="rg-containerapps-github-actions"
LOCATION="westeurope"
CONTAINERAPPS_ENVIRONMENT="aca-environment"
CONTAINERAPPS_APP="album-backend-api"

az group create \
         --name $RESOURCE_GROUP \
         --location $LOCATION

az containerapp env create \
                --name $CONTAINERAPPS_ENVIRONMENT \
                --resource-group $RESOURCE_GROUP \
                --location $LOCATION

az containerapp create \
                --name $CONTAINERAPPS_APP \
                --resource-group $RESOURCE_GROUP \
                --environment $CONTAINERAPPS_ENVIRONMENT \
                --image mcr.microsoft.com/azuredocs/containerapps-helloworld:latest \
                --target-port 80 \
                --ingress 'external'

az containerapp show \
                --name $CONTAINERAPPS_APP \
                --resource-group $RESOURCE_GROUP \
                --query properties.configuration.ingress.fqdn

We should have these resources created.

Create an Azure Service Principal (SPN) to be used by Github Actions to authenticate to Azure.

SUBSCRIPTION_ID=$(az account list --query [?isDefault].id -o tsv)

echo $SUBSCRIPTION_ID
# xxxxxxxx-3960-4e6f-a663-a06fdae23428

az ad sp create-for-rbac -n "spn-aca-github" --role Contributor --scope /subscriptions/$SUBSCRIPTION_ID --sdk-auth

About

Demo application for Azure Container Apps GitHub Action

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages