Try a different way to notify Discord in CI
This commit is contained in:
14
.github/workflows/main.yml
vendored
14
.github/workflows/main.yml
vendored
@@ -521,22 +521,24 @@ jobs:
|
|||||||
|
|
||||||
notify-discord:
|
notify-discord:
|
||||||
runs-on: ubuntu-16.04
|
runs-on: ubuntu-16.04
|
||||||
if: always()
|
|
||||||
needs: [android, flash, hashlink, html5, ios, linux, macos, neko, windows]
|
needs: [android, flash, hashlink, html5, ios, linux, macos, neko, windows]
|
||||||
steps:
|
steps:
|
||||||
|
- name: Notify Discord
|
||||||
- name: Notify Discord (success)
|
|
||||||
uses: appleboy/discord-action@master
|
uses: appleboy/discord-action@master
|
||||||
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name
|
|
||||||
with:
|
with:
|
||||||
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
|
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
|
||||||
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
|
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
|
||||||
color: "#00C07F"
|
color: "#00C07F"
|
||||||
message: "https://github.com/haxelime/lime/actions/runs/${{ github.run_id }}\nCI build succeeded"
|
message: "https://github.com/haxelime/lime/actions/runs/${{ github.run_id }}\nCI build succeeded"
|
||||||
|
|
||||||
- name: Notify Discord (failure)
|
notify-discord-failure:
|
||||||
|
runs-on: ubuntu-16.04
|
||||||
|
needs: [notify-discord]
|
||||||
|
if: always()
|
||||||
|
steps:
|
||||||
|
- name: Notify Discord (failure)
|
||||||
uses: appleboy/discord-action@master
|
uses: appleboy/discord-action@master
|
||||||
if: failure() && (github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name)
|
if: needs.notify-discord.result != 'success'
|
||||||
with:
|
with:
|
||||||
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
|
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
|
||||||
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
|
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
|
||||||
|
|||||||
Reference in New Issue
Block a user