Skip to content

Update environment variables #7

Update environment variables

Update environment variables #7

# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions
name: Build and deploy container app to Azure Web App - linjungz-chat-with-your-doc
on:
push:
branches:
- staging
workflow_dispatch:
jobs:
build:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to registry
uses: docker/login-action@v2
with:
registry: https://linjungzdemo.azurecr.io/
username: ${{ secrets.AzureAppService_ContainerUsername_39a1f6c9d86e43f5aac5a1d450450c16 }}
password: ${{ secrets.AzureAppService_ContainerPassword_38a40afcd79348fea56abba14e98e41c }}
- name: Build and push container image to registry
uses: docker/build-push-action@v3
with:
push: true
tags: linjungzdemo.azurecr.io/${{ secrets.AzureAppService_ContainerUsername_39a1f6c9d86e43f5aac5a1d450450c16 }}/linjungzdemo/chat-with-your-doc:${{ github.sha }}
file: ./Dockerfile
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: 'production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
steps:
- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'linjungz-chat-with-your-doc'
slot-name: 'production'
publish-profile: ${{ secrets.AzureAppService_PublishProfile_743e9580f10645c9bc154cc4ca774801 }}
images: 'linjungzdemo.azurecr.io/${{ secrets.AzureAppService_ContainerUsername_39a1f6c9d86e43f5aac5a1d450450c16 }}/linjungzdemo/chat-with-your-doc:${{ github.sha }}'