kind: pipeline
name: build

trigger:
  event:
    - push
  branch:
    - main

steps:
  - name: docker-default
    image: plugins/docker
    settings:
      registry: git.riksolo.com
      username: riksolo
      repo: git.riksolo.com/${DRONE_REPO,,}
      tags:
        - latest
        - ${DRONE_COMMIT}
      password:
        from_secret: dockertoken

  - name: docker-rblicht
    image: plugins/docker
    settings:
      registry: git.riksolo.com
      username: riksolo
      repo: git.riksolo.com/${DRONE_REPO,,}
      build_args:
        - SITE=rblicht
      tags:
        - latest-rblicht
        - ${DRONE_COMMIT}-rblicht
      password:
        from_secret: dockertoken

  - name: trigger docker-compose release
    image: plugins/downstream
    settings:
      server: https://drone.riksolo.com
      token:
        from_secret: drone_token
      repositories:
        - RikSolo/docker-compose
    depends_on:
      - docker-default
      - docker-rblicht