Skip to content

Contentious Deployment #22

Contentious Deployment

Contentious Deployment #22

Workflow file for this run

name: Contentious Deployment
on:
# push:
# branches:
# - master
workflow_dispatch:
jobs:
build:
name: Build ${{ matrix.build.tag }}
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
build:
- { path: "./apps/corgiai", tag: "ghcr.io/blazekill/corgiai/app" }
# - { path: "./apps/py-chat", tag: "corgiai/py-chat" }
# - { path: "./apps/py-loader", tag: "corgiai/py-loader" }
# - { path: "./apps/pull-model", tag: "corgiai/pull-model" }
steps:
- uses: actions/checkout@v4
- name: 'Login Github Container Registery'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
context: ${{ matrix.build.path }}
tags: ${{ matrix.build.tag }}:${{ github.sha }}
build-contexts: |
config=./config
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.CORGIAI_AZURE_CREDENTIALS }}
- name: Build and push container image to registry
uses: azure/container-apps-deploy-action@v2
with:
registryUrl: ghcr.io
registryUsername: ${{ github.actor }}
registryPassword: ${{ secrets.GITHUB_TOKEN }}
containerAppName: corgiai
resourceGroup: corgiai
imageToDeploy: ghcr.io/blazekill/corgiai/app:${{ github.sha }}