version: 2.1
jobs:
  build:
    docker:
      - image: cimg/go:1.20
    steps:
      - checkout
      - setup_remote_docker:
          docker_layer_caching: true
      - run:
          name: Install Dagger CLI
          command: cd /usr/local && { curl -L https://dl.dagger.io/dagger/install.sh | sudo sh; cd -; }
      - run:
          name: Run Dagger pipeline
          command: dagger run --progress plain go run main.go
workflows:
  dagger:
    jobs:
      - build
