Update CI script
This commit is contained in:
22
.github/workflows/main.yml
vendored
22
.github/workflows/main.yml
vendored
@@ -541,3 +541,25 @@ jobs:
|
||||
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
|
||||
color: "#FF6562"
|
||||
message: "https://github.com/haxelime/lime/actions/runs/${{ GITHUB_RUN_ID }}\nCI build failed."
|
||||
|
||||
test-notify-discord:
|
||||
if: always()
|
||||
steps:
|
||||
|
||||
- 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: "<a href="https://github.com/haxelime/lime/actions/runs/${{ GITHUB_RUN_ID }}">CI build succeeded.</a>"
|
||||
|
||||
- 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/runs/${{ GITHUB_RUN_ID }}\nCI build failed."
|
||||
|
||||
Reference in New Issue
Block a user