Add Discord notification to CI script
This commit is contained in:
18
.github/workflows/main.yml
vendored
18
.github/workflows/main.yml
vendored
@@ -206,3 +206,21 @@ jobs:
|
|||||||
lime build HelloWorld windows -release -verbose -nocolor
|
lime build HelloWorld windows -release -verbose -nocolor
|
||||||
lime build SimpleImage windows -release -verbose -nocolor
|
lime build SimpleImage windows -release -verbose -nocolor
|
||||||
lime build SimpleAudio windows -release -verbose -nocolor
|
lime build SimpleAudio windows -release -verbose -nocolor
|
||||||
|
|
||||||
|
- name: Notify Discord (success)
|
||||||
|
uses: appleboy/discord-action@master
|
||||||
|
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name
|
||||||
|
with:
|
||||||
|
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
|
||||||
|
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
|
||||||
|
color: "#00C07F"
|
||||||
|
message: "https://github.com/haxelime/lime/actions\nCI build succeeded."
|
||||||
|
|
||||||
|
- name: Notify Discord (failure)
|
||||||
|
uses: appleboy/discord-action@master
|
||||||
|
if: failure() && (github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name)
|
||||||
|
with:
|
||||||
|
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
|
||||||
|
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
|
||||||
|
color: "#FF6562"
|
||||||
|
message: "https://github.com/haxelime/lime/actions\nCI build failed."
|
||||||
|
|||||||
Reference in New Issue
Block a user