Merge pull request #70 from jswistak/feature/few-shot #13
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: 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 }} | |