2022-02-06 04:40:42 +00:00
|
|
|
name: Discord notifications
|
2022-01-20 23:09:34 +00:00
|
|
|
|
|
|
|
on:
|
2023-12-06 04:07:15 +00:00
|
|
|
release:
|
|
|
|
types:
|
|
|
|
- published
|
2022-01-20 23:09:34 +00:00
|
|
|
workflow_run:
|
2023-12-06 04:07:15 +00:00
|
|
|
workflows: ["Build and Publish"]
|
2022-01-20 23:09:34 +00:00
|
|
|
types:
|
|
|
|
- completed
|
|
|
|
|
|
|
|
env:
|
|
|
|
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
discord:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
timeout-minutes: 5
|
|
|
|
steps:
|
2023-12-06 04:07:15 +00:00
|
|
|
- name: on-publish
|
|
|
|
if: github.event_name == 'release' && github.event.action == 'published'
|
|
|
|
uses: Ilshidur/action-discord@master
|
|
|
|
with:
|
|
|
|
args: |
|
|
|
|
Github repo: [${{ github.repository }}](<${{ github.event.repository.html_url}}>)
|
|
|
|
Release: [${{ github.event.release.name }}](<${{ github.event.release.html_url }}>)
|
|
|
|
${{ github.event.release.body }}
|
2022-01-20 23:09:34 +00:00
|
|
|
- name: on-success
|
2023-12-06 04:07:15 +00:00
|
|
|
if: github.event.workflow_run.conclusion == 'success'
|
2022-01-20 23:09:34 +00:00
|
|
|
uses: Ilshidur/action-discord@master
|
|
|
|
with:
|
2023-12-06 04:07:15 +00:00
|
|
|
args: |
|
|
|
|
Github repo: ${{ github.repository }}
|
|
|
|
- Branch: ${{ github.event.workflow_run.head_branch }}
|
|
|
|
- [Link: to Actions](<${{ github.event.workflow_run.html_url }}>)
|
|
|
|
- Status: 🎉 ${{ github.event.workflow_run.conclusion }} 🍏
|
2022-01-20 23:09:34 +00:00
|
|
|
- name: on-failure
|
2023-12-06 04:07:15 +00:00
|
|
|
if: github.event.workflow_run.conclusion == 'failure'
|
2022-01-20 23:09:34 +00:00
|
|
|
uses: Ilshidur/action-discord@master
|
|
|
|
with:
|
2023-12-06 04:07:15 +00:00
|
|
|
args: |
|
|
|
|
Github repo: ${{ github.repository }}
|
|
|
|
- Branch: ${{ github.event.workflow_run.head_branch }}
|
|
|
|
- [Link: to Actions](<${{ github.event.workflow_run.html_url }}>)
|
|
|
|
- Status: 🤔 ${{ github.event.workflow_run.conclusion }} 💣💥
|