Files
ollama-docker/.github/workflows/deploy.yml
Gormery Kombo Wanjiru 0c23713899 s
2024-02-27 20:24:04 +01:00

36 lines
1.0 KiB
YAML

name: test-and-deploy
on:
workflow_dispatch:
workflow_run:
workflows: ["ollama-docker"] # This triggers the deployment after ollama-docker workflow completes
types:
- completed
permissions:
id-token: write
contents: read
jobs:
deploy-azure:
runs-on: ubuntu-latest
steps:
- name: 'Az CLI login'
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: 'Run Azure CLI commands'
run: |
az containerapp up \
--name my-container-app \
--resource-group my-container-apps \
--location centralus \
--environment 'my-container-apps' \
--image ${{ secrets.DOCKER_HUB_USERNAME }}/ollama-docker:latest \ # Ensure this matches your Docker Hub repo
--target-port 80 \
--ingress external \
--query properties.configuration.ingress.fqdn