Skip to content

Commit

Permalink
Create an auto-deploy file
Browse files Browse the repository at this point in the history
  • Loading branch information
BLaZeKiLL committed Nov 20, 2023
1 parent 76ef1c3 commit 9b0a3aa
Showing 1 changed file with 42 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Trigger auto deployment for corgiai

# When this action will be executed
on:
# Automatically trigger it when detected changes in repo
push:
branches:
[ main ]
paths:
- 'apps/corgiai/**'
- '.github/workflows/corgiai-AutoDeployTrigger-1cc17b4c-4284-4a11-bca7-bb702d10ff7e.yml'

# Allow manual trigger
workflow_dispatch:

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout to the branch
uses: actions/checkout@v2

- 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:
appSourcePath: ${{ github.workspace }}/apps/corgiai
registryUrl: ghcr.io
registryUsername: ${{ secrets.CORGIAI_REGISTRY_USERNAME }}
registryPassword: ${{ secrets.CORGIAI_REGISTRY_PASSWORD }}
containerAppName: corgiai
resourceGroup: corgiai
imageToBuild: ghcr.io/corgiai:${{ github.sha }}
dockerfilePath: Dockerfile



0 comments on commit 9b0a3aa

Please sign in to comment.