Merge pull request #6107 from freqtrade/remove_slack

Update CI to notify on discord only
This commit is contained in:
Matthias 2021-12-23 21:50:49 +01:00 committed by GitHub
commit 58663180e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 31 additions and 47 deletions

View File

@ -101,16 +101,13 @@ jobs:
run: | run: |
mypy freqtrade scripts mypy freqtrade scripts
- name: Slack Notification - name: Discord notification
uses: lazy-actions/slatify@v3.0.0 uses: rjstone/discord-webhook-notify@v1
if: failure() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false) if: failure() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false)
with: with:
type: ${{ job.status }} severity: error
job_name: '*Freqtrade CI ${{ matrix.os }}*' details: Freqtrade CI failed on ${{ matrix.os }}
mention: 'here' webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
mention_if: 'failure'
channel: '#notifications'
url: ${{ secrets.SLACK_WEBHOOK }}
build_macos: build_macos:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
@ -194,17 +191,13 @@ jobs:
run: | run: |
mypy freqtrade scripts mypy freqtrade scripts
- name: Slack Notification - name: Discord notification
uses: lazy-actions/slatify@v3.0.0 uses: rjstone/discord-webhook-notify@v1
if: failure() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false) if: failure() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false)
with: with:
type: ${{ job.status }} severity: error
job_name: '*Freqtrade CI ${{ matrix.os }}*' details: Test Succeeded!
mention: 'here' webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
mention_if: 'failure'
channel: '#notifications'
url: ${{ secrets.SLACK_WEBHOOK }}
build_windows: build_windows:
@ -257,16 +250,13 @@ jobs:
run: | run: |
mypy freqtrade scripts mypy freqtrade scripts
- name: Slack Notification - name: Discord notification
uses: lazy-actions/slatify@v3.0.0 uses: rjstone/discord-webhook-notify@v1
if: failure() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false) if: failure() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false)
with: with:
type: ${{ job.status }} severity: error
job_name: '*Freqtrade CI windows*' details: Test Failed
mention: 'here' webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
mention_if: 'failure'
channel: '#notifications'
url: ${{ secrets.SLACK_WEBHOOK }}
docs_check: docs_check:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
@ -288,14 +278,13 @@ jobs:
pip install mkdocs pip install mkdocs
mkdocs build mkdocs build
- name: Slack Notification - name: Discord notification
uses: lazy-actions/slatify@v3.0.0 uses: rjstone/discord-webhook-notify@v1
if: failure() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false) if: failure() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false)
with: with:
type: ${{ job.status }} severity: error
job_name: '*Freqtrade Docs*' details: Freqtrade doc test failed!
channel: '#notifications' webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
url: ${{ secrets.SLACK_WEBHOOK }}
cleanup-prior-runs: cleanup-prior-runs:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
@ -306,7 +295,7 @@ jobs:
env: env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# Notify on slack only once - when CI completes (and after deploy) in case it's successfull # Notify only once - when CI completes (and after deploy) in case it's successfull
notify-complete: notify-complete:
needs: [ build_linux, build_macos, build_windows, docs_check ] needs: [ build_linux, build_macos, build_windows, docs_check ]
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
@ -320,14 +309,13 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Slack Notification - name: Discord notification
uses: lazy-actions/slatify@v3.0.0 uses: rjstone/discord-webhook-notify@v1
if: always() && steps.check.outputs.has-permission && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false) if: always() && steps.check.outputs.has-permission && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false)
with: with:
type: ${{ job.status }} severity: info
job_name: '*Freqtrade CI*' details: Test Completed!
channel: '#notifications' webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
url: ${{ secrets.SLACK_WEBHOOK }}
deploy: deploy:
needs: [ build_linux, build_macos, build_windows, docs_check ] needs: [ build_linux, build_macos, build_windows, docs_check ]
@ -400,17 +388,13 @@ jobs:
run: | run: |
build_helpers/publish_docker_multi.sh build_helpers/publish_docker_multi.sh
- name: Discord notification
- name: Slack Notification uses: rjstone/discord-webhook-notify@v1
uses: lazy-actions/slatify@v3.0.0
if: always() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false) if: always() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false)
with: with:
type: ${{ job.status }} severity: info
job_name: '*Freqtrade CI Deploy*' details: Deploy Succeeded!
mention: 'here' webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
mention_if: 'failure'
channel: '#notifications'
url: ${{ secrets.SLACK_WEBHOOK }}
deploy_arm: deploy_arm: