I created an azure open ai application and deployed it using the playground. This automatically created a web app and an app service. I found that the code of the application is at https://github.com/microsoft/sample-app-aoai-chatGPT
I want to make a change in the repo and deploy application from the modified repo. So I forked the repo and made change to file frontend-src-pages-layout-layout.tsx. I changed the text “Azure AI” to “Azure AI by me”. Then I disconnected the old repo and created a new connection (with option to use the existing workflow file)
I saw this message
Then I restarted the app. However, I don't see the change. The page still looks like original. I expected the Azure AI text on top left to be Azure AI by me.
What am I missing
update
I went to actions in github and saw the message
I enabled workflow.
I didn't see any workflow getting executed
Then I made another change in layout.tsx and directly committed it to main branch. I am making changes directly in github using the edit button for the file.
I see that a workflow execution was attempted but failed.
It is asking for username. I don't know why though. I haven't set up ACR_USERNAME as I thought that because I am changing an existing app service code, i don't need to. Do I and how?
After fixing the ACR issue (thanks to Github workflow failing with error - Error: Error: Input required and not supplied: username and Azure Container Registry and Github actions - denied: requested access to the resource is denied) I was able to execute the workflow. I see that the change to pushed. However, I don't see the change in my app.
Not sure if it is relevant but in the web app deployment, I don't see any logs from the time the workflow was executed.
I thought maybe I need to redeploy but that is failing.
My .github/workflow file is .github/workflows/docker-image.yml.
name: Docker Image CI
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Azure Container Registry Login
uses: Azure/docker-login@v1
with:
# Container registry username
username: ${{ secrets.ACR_USERNAME }}
# Container registry password
password: ${{ secrets.ACR_PASSWORD }}
# Container registry server url
login-server: ${{ secrets.ACR_LOGIN_SERVER }}
- uses: actions/checkout@v3
- name: Build the Docker image
run:
docker build . --file WebApp.Dockerfile --tag craistudiodemoresouce383718707273.azurecr.io/sample-app-aoai-chatgpt:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER;
docker tag craistudiodemoresouce383718707273.azurecr.io/sample-app-aoai-chatgpt:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER craistudiodemoresouce383718707273.azurecr.io/sample-app-aoai-chatgpt:latest;
docker push craistudiodemoresouce383718707273.azurecr.io/sample-app-aoai-chatgpt:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER;
docker push craistudiodemoresouce383718707273.azurecr.io/sample-app-aoai-chatgpt:latest;
I have added the following section in the end
- name: Build and deploy Container App
uses: azure/container-apps-deploy-action@v1
with:
appSourcePath: ${{ github.workspace }}/src
acrName: craistudiodemoresouce383718707273
containerAppName: careeradvisorbot
resourceGroup: rg-aistudiodemoresouce
but I am now getting error
Run azure/container-apps-deploy-action@v1
Run CA_GH_ACTION_START_MILLISECONDS=$(date +%s%N | cut -b1-13)
Run az config set extension.use_dynamic_install=yes_without_prompt
WARNING: Command group 'config' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Run CA_GH_ACTION_ACR_ACCESS_TOKEN=$(az acr login --name *** --output json --expose-token | jq -r '.accessToken')
WARNING: Unable to get AAD authorization tokens with message: Please run 'az login' to setup account.
WARNING: Unable to get admin user credentials with message: Please run 'az login' to setup account.
ERROR: Unable to authenticate using AAD or admin login credentials. Please specify both username and password in non-interactive mode.
Error: Process completed with exit code 1.
I later changed workflow.yml to
- uses: azure/webapps-deploy@v2
with:
publish-profile: ${{ secrets.AZURE_PUBLISH_PROFILE }}
I saw that the workflow completed successfully
I see the following message in deployment centre
but when I restarted the app, I got error
I guess this is where I need service principal.













