Skip to content

Netflix, blogging @ medium.com #6

Netflix, blogging @ medium.com

Netflix, blogging @ medium.com #6

name: Push To Discord Channel on Pull Request Closed
on:
pull_request_target:
types:
- closed
branches:
- main
jobs:
push-to-discord:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Post Discord
shell: bash
env:
DISCORD_WEBHOOK: $ {{ secrets.GDSC_CAU_DISCORD_ARTICLES }}
run: |
curl -X POST \
-H "Content-Type: application/json" \
-d '{ "content": "New readings are updated!", "embeds": [{ "author": { "name": "${{ github.event.pull_request.user.login }}" }, "title": "${{ github.event.pull_request.title }}", "url": "https://github.com/${{ github.repository }}", "description": "${{ github.event.pull_request.body }}", "color": ${{ vars.DISCORD_EMBED_COLOR }} }]}' \
"$DISCORD_WEBHOOK"