Skip to content

Commit

Permalink
feat(ci): realiza integração com o discord
Browse files Browse the repository at this point in the history
integração via webhook com o discord do core team

DTHFUI-7986
  • Loading branch information
pedrodominguesp authored and CSimoesJr committed Mar 18, 2024
1 parent fdd22ca commit deff9b8
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,21 @@ on:
# Os jobs são conjuntos de actions que são executados na mesma máquina virtual.
# É possível ter mais de um job e assim executar ações paralelamente.
jobs:

discord_notification_on_pr:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.event.pull_request.merged == false
steps:
- name: Notify Discord on PR
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
run: |
AUTHOR="${{ github.event.pull_request.user.login }}"
PR_TITLE="${{ github.event.pull_request.title }}"
PR_URL="${{ github.event.pull_request.html_url }}"
curl -X POST -H "Content-Type: application/json" \
-d "{\"content\": \"🚀 **PR Criada com Sucesso 🚀**\\n- Autor: $AUTHOR\\n- Título: $PR_TITLE\\n- Link: $PR_URL\"}" \
$DISCORD_WEBHOOK_URL
lint:

runs-on: ubuntu-20.04
Expand Down

0 comments on commit deff9b8

Please sign in to comment.