From 592f3871498da018d3e04e591e93a8f3e775fb7a Mon Sep 17 00:00:00 2001 From: NoMathExpectation <85624722+NoMathExpectation@users.noreply.github.com> Date: Wed, 11 Mar 2026 23:12:01 +0800 Subject: [PATCH] Fixed notification. --- .github/workflows/gradle.yml | 6 ++++++ .github/workflows/notify.yml | 12 +++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index acf3981..fae2632 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -54,3 +54,9 @@ jobs: uses: gradle/gradle-build-action@ce999babab2de1c4b649dc15f0ee67e6246c994f with: arguments: ${{ matrix.target }} + - name: Notify Discord If Failed + if: ${{ cancelled() }} + uses: nitecon/discord-action@v2 + with: + webhook-url: ${{ secrets.DISCORD_WEBHOOK }} + job-status: ${{ job.status }} diff --git a/.github/workflows/notify.yml b/.github/workflows/notify.yml index 2d95ea7..230beb4 100644 --- a/.github/workflows/notify.yml +++ b/.github/workflows/notify.yml @@ -1,9 +1,11 @@ -on: push +name: Notify Discord +on: [ push, pull_request, release ] + jobs: - discord-notifier: + notify: runs-on: ubuntu-latest steps: - - name: Discord Notification - uses: tenzin1308/discord-notification@v1.0.0 + - name: Send Discord notification + uses: nitecon/discord-action@v2 with: - discord-webhook-url: ${{ secrets.DISCORD_WEBHOOKS_URL }} \ No newline at end of file + webhook-url: ${{ secrets.DISCORD_WEBHOOK }} \ No newline at end of file