Skip to content

Contentious Deployment #27

Contentious Deployment

Contentious Deployment #27

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 }},${{ matrix.build.tag }}:latest
build-contexts: |
config=./config
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Lowercase the repo name
run: echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
- name: Deploy to azure
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
images: ghcr.io/blazekill/corgiai/app:${{ github.sha }}