kind: pipeline
type: kubernetes
name: default

trigger:
  branch:
    - master

steps:
  # Unit Tests
  - name: tests
    image: golang
    commands:
      - make tests

  # Fetch tags
  - name: fetch tags
    image: alpine/git
    commands:
      - git fetch --tags

  # Publish docker image
  - name: publish docker
    image: plugins/docker
    settings:
      repo: gitea.va.reichard.io/evan/antholume
      registry: gitea.va.reichard.io
      tags:
        - dev
      username:
        from_secret: docker_username
      password:
        from_secret: docker_password
