2021-04-12 20:33:42 +03:00
name : Discord notifications
on : [ push, pull_request_target]
jobs :
notify_discord :
runs-on : ubuntu-20.04
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 10:30:03 +02: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-04-20 12:42:43 +03:00
if : ${{ (github.event['pull_request'] && github.event['action'] == 'opened' && !github.event.pull_request.draft) || github.event['commits'] }}