-
Notifications
You must be signed in to change notification settings - Fork 3
56 lines (47 loc) · 1.51 KB
/
cd.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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 }}