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