trigger:
- master

pool:
  name: 'Azure Pipelines'
  vmImage: ubuntu-latest

steps:
- task: UsePythonVersion@0
  inputs:
    versionSpec: '3.11'
  displayName: 'Install Python'

- script: pip install dagger-io aiohttp azure-identity azure-mgmt-containerinstance
  displayName: 'Install Dagger and Azure SDKs'

- script: cd /usr/local && { curl -L https://dl.dagger.io/dagger/install.sh | sh; cd -; }
  displayName: 'Install Dagger CLI'

- script: dagger run python ci/main.py
  displayName: 'Run Dagger'
  env:
    DOCKERHUB_PASSWORD: $(DOCKERHUB_PASSWORD)
    AZURE_CLIENT_SECRET: $(AZURE_CLIENT_SECRET)
