version: 0.2

phases:
  pre_build:
    commands:
      - echo "Installing Dagger SDK for Node.js"
      - npm install @dagger.io/dagger@latest
      - echo "Installing Dagger CLI"
      - cd /usr/local && { curl -L https://dl.dagger.io/dagger/install.sh | sh; cd -; }

  build:
    commands:
      - echo "Running Dagger pipeline"
      - dagger run node ci/index.mjs

  post_build:
    commands:
      - echo "Build completed on `date`"
