trigger:
- master

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

steps:
- task: NodeTool@0
  inputs:
    versionSpec: '18.x'
  displayName: 'Install Node.js'

- script: npm install @dagger.io/dagger @azure/arm-containerinstance @azure/identity
  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 node ci/index.mjs
  displayName: 'Run Dagger'
  env:
    DOCKERHUB_PASSWORD: $(DOCKERHUB_PASSWORD)
    AZURE_CLIENT_SECRET: $(AZURE_CLIENT_SECRET)
