notify.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. name: Get Conan Recipe Version
  2. on:
  3. workflow_call:
  4. inputs:
  5. success:
  6. required: true
  7. type: boolean
  8. success_title:
  9. required: true
  10. type: string
  11. success_body:
  12. required: true
  13. type: string
  14. failure_title:
  15. required: true
  16. type: string
  17. failure_body:
  18. required: true
  19. type: string
  20. jobs:
  21. slackNotification:
  22. name: Slack Notification
  23. runs-on: ubuntu-latest
  24. steps:
  25. - name: Slack notify on-success
  26. if: ${{ inputs.success }}
  27. uses: rtCamp/action-slack-notify@v2
  28. env:
  29. SLACK_USERNAME: ${{ github.repository }}
  30. SLACK_COLOR: #00ff00
  31. SLACK_ICON: https://github.com/Ultimaker/Cura/blob/main/icons/cura-128.png?raw=true
  32. SLACK_TITLE: ${{ inputs.success_title }}
  33. SLACK_MESSAGE: ${{ inputs.success_body }}
  34. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
  35. - name: Slack notify on-failure
  36. if: ${{ !inputs.success }}
  37. uses: rtCamp/action-slack-notify@v2
  38. env:
  39. SLACK_USERNAME: ${{ github.repository }}
  40. SLACK_COLOR: #ff0000
  41. SLACK_ICON: https://github.com/Ultimaker/Cura/blob/main/icons/cura-128.png?raw=true
  42. SLACK_TITLE: ${{ inputs.failure_title }}
  43. SLACK_MESSAGE: ${{ inputs.failure_body }}
  44. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}