Fix imageToBuild path in Azure deployment workflow #11
This file contains hidden or 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: Deploy to Azure App Service | |
on: | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
env: | |
WORKING_DIRECTORY: '.' | |
jobs: | |
build-test-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: 'Checkout database' | |
uses: actions/checkout@v4 | |
with: | |
repository: jeroenvdmeer/feyod | |
path: ./feyod | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
cache: 'pip' | |
- name: Build SQLite Database | |
run: | | |
echo "Building feyod.db..." | |
cd ./feyod | |
rm -f feyod.db # Ensure clean start | |
sqlite3 feyod.db < feyod.sql | |
echo "Database successfully built." | |
- name: Log in to Azure | |
uses: azure/login@v2 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: Build and deploy Container App | |
uses: azure/container-apps-deploy-action@v2 | |
with: | |
appSourcePath: . | |
dockerfilePath: ./Dockerfile | |
registryUrl: registry.hub.docker.com | |
registryUsername: ${{ secrets.REGISTRY_USERNAME }} | |
registryPassword: ${{ secrets.REGISTRY_PASSWORD }} | |
imageToBuild: registry.hub.docker.com/jeroenvdmeer/feyod-mcp:latest | |
location: ${{ secrets.AZURE_LOCATION }} | |
resourceGroup: ${{ secrets.AZURE_RESOURCE_GROUP }} | |
containerAppEnvironment: ${{ secrets.AZURE_CONTAINER_APP_ENVIRONMENT }} | |
containerAppName: ${{ secrets.AZURE_CONTAINER_APP_NAME }} | |
ingress: external | |
targetPort: 8000 | |
disableTelemetry: true | |
environmentVariables: LOG_LEVEL="INFO" FEYOD_DATABASE_URL="sqlite+aiosqlite:///feyod/feyod.db" LLM_PROVIDER=${{ secrets.LLM_PROVIDER }} LLM_API_KEY=${{ secrets.LLM_API_KEY }} LLM_MODEL=${{ secrets.LLM_MODEL }} EXAMPLE_SOURCE="mongodb" EXAMPLE_DB_CONNECTION_STRING=${{ secrets.DB_CONNECTION_STRING }} EXAMPLE_DB_NAME=${{ secrets.DB_NAME }} EXAMPLE_DB_COLLECTION=${{ secrets.DB_COLLECTION }} |