Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 24 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'
Expand Down
Loading