version: 0.2

phases:
  pre_build:
    commands:
      - echo "Installing Dagger SDK for Go"
      - go get dagger.io/dagger
      - 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 go run ci/main.go

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