---
kind: pipeline
type: docker
name: trigger

steps:
  - name: trigger
    image: plugins/downstream
    settings:
      server: https://drone.alexlebens.net
      token: 
        from_secret: drone_token
      fork: true
      repositories:
        - alexlebens/DroneImage

  - name: Nofification > Discord | Trigger - Success
    image: appleboy/drone-discord
    settings:
      webhook_id:
        from_secret: discord_webhook_id
      webhook_token:
        from_secret: discord_webhook_token
      username: DroneCI - ps03fd
      message: Trigger executed from Deployment Scripts to DroneImage
    when:
      status:
        - sucess

  - name: Nofification > Discord | Trigger - Failure
    image: appleboy/drone-discord
    settings:
      webhook_id:
        from_secret: discord_webhook_id
      webhook_token:
        from_secret: discord_webhook_token
      username: DroneCI - ps03fd
      message: Trigger failed from Deployment Scripts to DroneImage
    when:
      status:
        - failure