Skip to content

new poetry lock perhaps #76

new poetry lock perhaps

new poetry lock perhaps #76

name: Trigger auto deployment for jarvis-app
# When this action will be executed
on:
# Automatically trigger it when detected changes in repo
push:
branches:
[ main ]
paths:
- '**'
- '.github/workflows/jarvis-app-AutoDeployTrigger-fe916456-3d0a-4042-b95a-5a9c31a1dafb.yml'
# Allow mannually trigger
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout to the branch
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to container registry
uses: docker/login-action@v1
with:
registry: yusufk.azurecr.io
username: ${{ secrets.JARVISAPP_REGISTRY_USERNAME }}
password: ${{ secrets.JARVISAPP_REGISTRY_PASSWORD }}
- name: Build and push container image to registry
uses: docker/build-push-action@v2
with:
push: true
tags: yusufk.azurecr.io/jarvis-app:${{ github.sha }}
file: ./Dockerfile
context: ./
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.JARVISAPP_AZURE_CREDENTIALS }}
- name: Deploy to containerapp
uses: azure/CLI@v1
with:
inlineScript: |
az config set extension.use_dynamic_install=yes_without_prompt
az containerapp registry set -n jarvis-app -g jarvis-rg --server yusufk.azurecr.io --username ${{ secrets.JARVISAPP_REGISTRY_USERNAME }} --password ${{ secrets.JARVISAPP_REGISTRY_PASSWORD }}
az containerapp update -n jarvis-app -g jarvis-rg --image yusufk.azurecr.io/jarvis-app:${{ github.sha }}