dshoreman / servidor

A modern web application for managing servers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Restore full notification functionality to GitHub Actions

dshoreman opened this issue · comments

Here is the TravisCI config that was used for notifications prior to #335:

os: linux
dist: bionic
language: php

notifications:
  irc:
    channels:
      - "chat.freenode.net#servidor"
    on_success: change
    on_failure: always
    template:
      - "Build #%{build_number} (%{branch} @ %{commit} by %{author}) - %{message}"
      - "Details: %{build_url}"

GH Actions don't support the level of simple flexibility offered by on_success: change, so we'll probably end up needing a custom action so we can try to keep track of (or somehow check previous) build status and know when a build has been broken or fixed.

Currently our GHA workflow sends the same message for both push and pull_request events, but the latter is unknown since they're not triggering on the initial PR just yet. Ideally we want to have a link to the pull request, not just a compare link for two different commits.

todo

  1. Add some way of ignoring 8.1 status in conclusions
  2. Introduce state for the overall conclusion
  3. Use that state to provide a conclusion message

Parts 2 and 3 will provide the equivalent of on_failure: always and on_success: change on TravisCI.

Potential Outcomes and their Messages

  • previous status: none (e.g. PR submitted or first push on new branch)
    • failure: The workflow failed.
    • success: The workflow succeeded.
  • previous status: success
    • failure: The workflow was broken.
    • success: no message
  • previous status: failure
    • failure: The workflow is still failing.
    • success: The workflow was fixed!

Closing; notifications haven't been used since Freenode died.