kind: pipeline
name: default
workspace:
  base: /tulpanomicon

steps:
  - name: build ebook files
    image: xena/pandoc
    pull: always
    commands:
      - cd src && ./build.sh
    volumes:
      - name: book
        path: /tulpanomicon/book
  - name: build mdbook
    image: xena/mdbook
    pull: always
    commands:
      - mdbook build
    volumes:
      - name: book
        path: /tulpanomicon/book
  - name: build image
    image: docker:dind
    volumes:
      - name: book
        path: /tulpanomicon/book
      - name: dockersock
        path: /var/run/docker.sock
    commands:
      - sh -c 'docker build -t xena/tulpanomicon:$DRONE_COMMIT .'
  - name: auto-release
    image: xena/gitea-release:0.2.1
    settings:
      auth_username: cadey
      changelog_path: ./src/CHANGELOG.md
      gitea_server: https://tulpa.dev
      gitea_token:
        from_secret: GITEA_TOKEN
    when:
      event:
        - push
      branch:
        - master

volumes:
  - name: book
    temp: {}
  - name: dockersock
    host:
      path: /var/run/docker.sock

---


