diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 37b66eb..db8bf86 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,18 +10,36 @@ jobs: if: failure() needs: [check, test, build, sonar-analyze] steps: - - name: 📣 Notificar Discord - Falha - run: | - curl -H "Content-Type: application/json" -X POST -d "{\"content\":\"❌ Pipeline falhou no repositório ${{ github.repository }} na branch ${{ github.ref_name }}. Verifique os logs para mais detalhes.\"}" ${{ secrets.DISCORD_WEBHOOK_URL }} + - name: 📣 Fail discord notification + uses: tsickert/discord-webhook@v5.3.0 + with: + webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }} + username: 'fulano triste' + avatar-url: 'https://media.discordapp.net/attachments/1413674985263730709/1413677177345413171/image0.jpg?ex=68bcccf7&is=68bb7b77&hm=13bdc8f5aab111255c822cd1a973b25a6e1835d73b825256b8f5e586829cd847&=&format=webp&width=765&height=930' + embed-title: 'Pipeline CI' + embed-description: '❌ Pipeline falhou! affs...' + embed-color: 14553088 + embed-thumbnail-url: 'https://media.discordapp.net/attachments/1413674985263730709/1413675507714887771/image0.jpg?ex=68bccb69&is=68bb79e9&hm=c1697b707e5afd5f4526467b135516ff06a76da633e6bc03224faf4ceaff77aa&=&format=webp&width=365&height=402' + embed-author-name: 'Github Actions' + embed-author-icon-url: 'https://cdn-icons-png.flaticon.com/512/25/25231.png' notify-success: runs-on: ubuntu-latest if: success() needs: [check, test, build, sonar-analyze] steps: - - name: 📣 Notificar Discord - Sucesso - run: | - curl -H "Content-Type: application/json" -X POST -d "{\"content\":\"✅ Pipeline concluída com sucesso no repositório ${{ github.repository }} na branch ${{ github.ref_name }}. Todos os jobs passaram!\"}" ${{ secrets.DISCORD_WEBHOOK_URL }} + - name: 📣 Success discord notification + uses: tsickert/discord-webhook@v5.3.0 + with: + webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }} + username: 'fulano' + avatar-url: 'https://cdn.discordapp.com/attachments/1413674985263730709/1413675018742923345/3bf.jpg?ex=68bccaf5&is=68bb7975&hm=d05cc7dc1c4c16fdb2c96f147e84d59a81eb5141479779e6b584ae32ad1261d7&' + embed-title: 'Pipeline CI' + embed-description: '✅ Pipeline concluída com sucesso! eba 🎉' + embed-color: 2067276 + embed-thumbnail-url: 'https://media.discordapp.net/attachments/1413674985263730709/1413675507714887771/image0.jpg?ex=68bccb69&is=68bb79e9&hm=c1697b707e5afd5f4526467b135516ff06a76da633e6bc03224faf4ceaff77aa&=&format=webp&width=365&height=402' + embed-author-name: 'Github Actions' + embed-author-icon-url: 'https://cdn-icons-png.flaticon.com/512/25/25231.png' sonar-analyze: runs-on: ubuntu-latest diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index 102a687..1c36310 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -123,10 +123,10 @@ jobs: uses: tsickert/discord-webhook@v5.3.0 with: webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }} - username: 'Github Actions' - avatar-url: 'https://cdn-icons-png.flaticon.com/512/7717/7717267.png' + username: 'fulano triste' + avatar-url: 'https://media.discordapp.net/attachments/1413674985263730709/1413677177345413171/image0.jpg?ex=68bcccf7&is=68bb7b77&hm=13bdc8f5aab111255c822cd1a973b25a6e1835d73b825256b8f5e586829cd847&=&format=webp&width=765&height=930' embed-title: 'Deploy DEV' - embed-description: '❌ Falha ao fazer deploy da api em DEV!' + embed-description: '❌ Falha ao fazer deploy da api em DEV! oh céus...' embed-color: 14553088 embed-thumbnail-url: 'https://e7.pngegg.com/pngimages/834/472/png-clipart-google-cloud-icon-google-cloud-platform-cloud-computing-amazon-web-services-virtual-private-cloud-cloud-computing-text-trademark.png' embed-author-name: 'Github Actions' @@ -143,10 +143,10 @@ jobs: uses: tsickert/discord-webhook@v5.3.0 with: webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }} - username: 'Github Actions' - avatar-url: 'https://cdn-icons-png.flaticon.com/512/7717/7717267.png' + username: 'fulano' + avatar-url: 'https://cdn.discordapp.com/attachments/1413674985263730709/1413675018742923345/3bf.jpg?ex=68bccaf5&is=68bb7975&hm=d05cc7dc1c4c16fdb2c96f147e84d59a81eb5141479779e6b584ae32ad1261d7&' embed-title: 'Deploy DEV' - embed-description: '✅ O Deploy da api em DEV foi realizado com sucesso!' + embed-description: '✅ O Deploy da api em DEV foi realizado com sucesso! eba 🎉' embed-color: 2067276 embed-thumbnail-url: 'https://e7.pngegg.com/pngimages/834/472/png-clipart-google-cloud-icon-google-cloud-platform-cloud-computing-amazon-web-services-virtual-private-cloud-cloud-computing-text-trademark.png' embed-author-name: 'Github Actions' diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index 1752c8e..c6d6cca 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -123,10 +123,10 @@ jobs: uses: tsickert/discord-webhook@v5.3.0 with: webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }} - username: 'Github Actions' - avatar-url: 'https://cdn-icons-png.flaticon.com/512/7717/7717267.png' + username: 'fulano triste' + avatar-url: 'https://media.discordapp.net/attachments/1413674985263730709/1413677177345413171/image0.jpg?ex=68bcccf7&is=68bb7b77&hm=13bdc8f5aab111255c822cd1a973b25a6e1835d73b825256b8f5e586829cd847&=&format=webp&width=765&height=930' embed-title: 'Deploy PROD' - embed-description: '❌ Falha ao fazer deploy da api em PROD!' + embed-description: '❌ Falha ao fazer deploy da api em PROD! vish...' embed-color: 14553088 embed-thumbnail-url: 'https://e7.pngegg.com/pngimages/834/472/png-clipart-google-cloud-icon-google-cloud-platform-cloud-computing-amazon-web-services-virtual-private-cloud-cloud-computing-text-trademark.png' embed-author-name: 'Github Actions' @@ -143,10 +143,10 @@ jobs: uses: tsickert/discord-webhook@v5.3.0 with: webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }} - username: 'Github Actions' - avatar-url: 'https://cdn-icons-png.flaticon.com/512/7717/7717267.png' + username: 'fulano' + avatar-url: 'https://cdn.discordapp.com/attachments/1413674985263730709/1413675018742923345/3bf.jpg?ex=68bccaf5&is=68bb7975&hm=d05cc7dc1c4c16fdb2c96f147e84d59a81eb5141479779e6b584ae32ad1261d7&' embed-title: 'Deploy PROD' - embed-description: '✅ O Deploy da api em PROD foi realizado com sucesso!' + embed-description: '✅ O Deploy da api em PROD foi realizado com sucesso! eba 🎉' embed-color: 2067276 embed-thumbnail-url: 'https://e7.pngegg.com/pngimages/834/472/png-clipart-google-cloud-icon-google-cloud-platform-cloud-computing-amazon-web-services-virtual-private-cloud-cloud-computing-text-trademark.png' embed-author-name: 'Github Actions'