Skip to content

https://velog.io/@choihuk/Elasticsearch%EB%A5%BC-%ED%99%9C%EC%9A%A9%E… #13

https://velog.io/@choihuk/Elasticsearch%EB%A5%BC-%ED%99%9C%EC%9A%A9%E…

https://velog.io/@choihuk/Elasticsearch%EB%A5%BC-%ED%99%9C%EC%9A%A9%E… #13

name: Notify Discord
on:
push:
branches:
- main
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Get commit message
id: get_commit
run: |
COMMIT_MESSAGE=$(git log -1 --pretty=%B)
COMMIT_AUTHOR=$(git log -1 --pretty=format:'%an')
echo "commit_message=$COMMIT_MESSAGE" >> $GITHUB_OUTPUT
echo "commit_author=$COMMIT_AUTHOR" >> $GITHUB_OUTPUT
- name: Send webhook to Discord
run: |
curl -X POST -H "Content-Type: application/json" \
-d "{\"content\": \"${{ steps.get_commit.outputs.commit_author }}: ${{ steps.get_commit.outputs.commit_message }}\"}" \
${{ secrets.DISCORD_WEBHOOK_URL }}