Skip to content

Add or update the Azure App Service build and deployment workflow config #3

Add or update the Azure App Service build and deployment workflow config

Add or update the Azure App Service build and deployment workflow config #3

name: Docker Image Publish
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Azure Container Registry Login
uses: Azure/docker-login@v2
with:
# Container registry username
username: ${{ secrets.SAMPLEAPP_ACR_USERNAME }}
# Container registry password
password: ${{ secrets.SAMPLEAPP_ACR_PASSWORD }}
# Container registry server url
login-server: sampleappaoaichatgpt.azurecr.io
- uses: actions/checkout@v3
- name: Build the Docker image
run:
docker build . --file WebApp.Dockerfile --tag sampleappaoaichatgpt.azurecr.io/sample-app-aoai-chatgpt:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER;
docker tag sampleappaoaichatgpt.azurecr.io/sample-app-aoai-chatgpt:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER sampleappaoaichatgpt.azurecr.io/sample-app-aoai-chatgpt:latest;
docker push sampleappaoaichatgpt.azurecr.io/sample-app-aoai-chatgpt:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER;
docker push sampleappaoaichatgpt.azurecr.io/sample-app-aoai-chatgpt:latest;