2021-04-12 20:33:42 +03:00
name : Discord notifications
on : [ push, pull_request_target]
jobs :
notify_discord :
2022-05-23 23:12:57 +03:00
runs-on : ubuntu-22.04
2021-04-12 20:33:42 +03:00
if : always() && github.repository == 'SerenityOS/serenity' && (github.event_name == 'pull_request_target' || (github.event_name == 'push' && github.ref == 'refs/heads/master'))
steps :
- name : Discord action notification
env :
DISCORD_WEBHOOK : ${{ secrets.DISCORD_WEBHOOK }}
2021-04-18 11:30:03 +03:00
CUSTOM_GITHUB_EVENT_NAME : ${{ github.event_name == 'pull_request_target' && 'pull_request' || github.event_name }} # fake the event type as discord doesn't know how to parse the special pull_request_target context
2021-04-12 20:33:42 +03:00
uses : IdanHo/action-discord@754598254f288e6d8e9fca637832e3c163515ba8
2021-10-26 20:56:42 +03:00
# FIXME: Find a way to notify on 'ready_for_review', but rate-limited to once/twice per day.
if : ${{ (github.event['pull_request'] && github.event['action'] == 'opened') || github.event['commits'] }}