Run whole notification job only on push and failure

This commit is contained in:
Gunter Labes 2023-08-10 23:27:17 +02:00 committed by GitHub
parent fac9504290
commit 8714f8e6bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -315,13 +315,11 @@ jobs:
notification: notification:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [checks, ubuntu, steam-runtime, mingw, flatpak, translations, macos-intel, windows] needs: [checks, ubuntu, steam-runtime, mingw, flatpak, translations, macos-intel, windows]
if: always() if: failure() && github.event_name == 'push'
steps: steps:
- uses: technote-space/workflow-conclusion-action@v3
- name: Discord Notification - name: Discord Notification
uses: rjstone/discord-webhook-notify@v1 uses: rjstone/discord-webhook-notify@v1
if: env.WORKFLOW_CONCLUSION == 'failure' && github.event_name == 'push'
with: with:
severity: error severity: error
webhookUrl: ${{ secrets.DISCORD_CI_WEBHOOK }} webhookUrl: ${{ secrets.DISCORD_CI_WEBHOOK }}
@ -331,7 +329,6 @@ jobs:
commit url: ${{ github.event.head_commit.url }} commit url: ${{ github.event.head_commit.url }}
- name: IRC Notification - name: IRC Notification
uses: rectalogic/notify-irc@v1 uses: rectalogic/notify-irc@v1
if: env.WORKFLOW_CONCLUSION == 'failure' && github.event_name == 'push'
env: env:
COLOR: ${{ fromJSON('"\u0003"') }} COLOR: ${{ fromJSON('"\u0003"') }}
BLUE: 02 BLUE: 02