Manually triggered Build and Deploy #19
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Manually triggered Build and Deploy | |
on: | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: 'Log level' | |
required: true | |
default: 'warning' | |
environment: | |
description: 'Environment to deploy' | |
required: false | |
default: 'demo' | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: | |
name: 'demo' | |
steps: | |
- name: Azure login | |
uses: azure/login@v2 | |
with: | |
client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Setup Python | |
uses: actions/[email protected] | |
with: | |
python-version: 3.12.4 | |
cache: 'pip' | |
- run: | | |
pip install -r requirements.txt | |
- run: | | |
python -m build --outdir ./docker/dist | |
- name: Publish Container Image | |
uses: Azure/[email protected] | |
with: | |
azcliversion: latest | |
inlineScript: | |
# az acr build --registry acrsydingdevkfpqjli23em5m --image ingen_dev:0.0.1 --file ./docker/development_images/linux_development_image_ubuntu.dockerfile ./docker/ | |
az acr build --registry ${{ secrets.CONTAINER_REGISTRY }} --image ingen_prd:0.0.1 --file ./docker/production_images/linux_with_chat_summariser.dockerfile ./docker/ | |
- name: Update Container App | |
uses: Azure/[email protected] | |
with: | |
azcliversion: latest | |
inlineScript: | |
az containerapp update -n ingen-app -g DefaultResourceGroup-EAU --image acrsydingdevkfpqjli23em5m.azurecr.io/ingen_prd:0.0.1 --set-env-vars APPSETTING_INGENIOUS_CONFIG=secretref:config APPSETTING_INGENIOUS_PROFILE=secretref:profile | |