From 3e996feb4e0accb7bb84e8ba168881d23aabe1b9 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 15 Feb 2023 19:52:38 +0000 Subject: [PATCH] Switch slack notifications to discord --- .github/workflows/build.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b1c8d78..cc3c4dd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,16 +33,13 @@ jobs: name: JARs path: target/*.jar - - name: Notify slack + - name: Notify discord if: always() && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.repository_owner == 'vlingo' - uses: rtCamp/action-slack-notify@v2 + uses: 'Ilshidur/action-discord@0.3.2' env: - SLACK_COLOR: "${{ job.status == 'success' && 'good' || 'danger' }}" - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - SLACK_CHANNEL: ci-cd - SLACK_USERNAME: Bob the Builder - SLACK_ICON: 'https://vlingo.io/wp-content/uploads/cropped-vlingo-favicon-180x180.png' - SLACK_FOOTER: '${{ github.repository }}' + DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} + DISCORD_USERNAME: Bob the Builder + DISCORD_EMBEDS: '[{"title":"Build ${{ job.status }}", "description":"[${{ github.repository }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})","author": { "icon_url": "https://avatars.githubusercontent.com/${{ github.actor }}", "name": "${{ github.actor }}", "url": "${{ github.server_url }}/${{ github.actor }}"},"color":"${{ job.status == ''success'' && ''65280'' || ''16711680'' }}"}]' - name: Cleanup run: rm -rf ~/.m2/repository/io/vlingo