Skip to content

Initial commit: React Native attribution SDK #4

Initial commit: React Native attribution SDK

Initial commit: React Native attribution SDK #4

name: Discord Notification
on: [push]
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Notify Discord
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL }}
COMMIT_MSG_RAW: ${{ github.event.head_commit.message }}
run: |
COMMIT_MSG=$(printf '%s' "$COMMIT_MSG_RAW" | head -1 | sed 's/"/\\"/g')
curl -s -H "Content-Type: application/json" \
-d "{\"embeds\":[{\"title\":\"⚛️ Push to React Native SDK\",\"color\":16043919,\"fields\":[{\"name\":\"Branch\",\"value\":\"${{ github.ref_name }}\",\"inline\":true},{\"name\":\"Author\",\"value\":\"${{ github.actor }}\",\"inline\":true},{\"name\":\"Commit\",\"value\":\"${COMMIT_MSG}\",\"inline\":false}],\"timestamp\":\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"}]}" \
"$DISCORD_WEBHOOK"