Skip to content

Merge pull request #70 from jswistak/feature/few-shot #13

Merge pull request #70 from jswistak/feature/few-shot

Merge pull request #70 from jswistak/feature/few-shot #13

name: Build, Push and Deploy Docker Image of Core App
on:
push:
branches: master
paths: 'src/**'
workflow_dispatch:
jobs:
build-and-push:
name: Build and Push Docker Image of Core App
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Azure Container Registry
uses: azure/docker-login@v1
with:
login-server: ${{ vars.ACR_NAME }}.azurecr.io
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
- name: Login to Azure Container Registry
uses: azure/docker-login@v1
with:
login-server: ${{ vars.ACR_NAME }}.azurecr.io
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
- name: Build and Push Docker Image
run: |
docker build -t ${{ vars.ACR_NAME }}.azurecr.io/${{ vars.CORE_APP_TAG }}:${{ github.sha }} .
docker push ${{ vars.ACR_NAME }}.azurecr.io/${{ vars.CORE_APP_TAG }}:${{ github.sha }}
deploy:
name: Deploy Docker Image of Core App to Azure Container App
runs-on: ubuntu-latest
needs: build-and-push
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Deploy to Azure Container App
run: |
az containerapp update \
--name ${{ vars.CORE_APP_CONTAINER_NAME }} \
--resource-group ${{ vars.RESOURCE_GROUP_NAME }} \
--image ${{ vars.ACR_NAME }}.azurecr.io/${{ vars.CORE_APP_TAG }}:${{ github.sha }}