-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
29f7519
commit b3b55d5
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Webhook on Push | ||
|
||
on: | ||
push: | ||
branches: | ||
- "*" # 모든 브랜치에서 푸시 시 트리거 | ||
|
||
jobs: | ||
send-webhook: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Gather Commit Information | ||
id: commit-info | ||
run: | | ||
TODAY=$(date -u +"%Y-%m-%d") | ||
COMMITS=$(git log --since="$TODAY" --pretty=format:"%an: %s" --decorate=short) | ||
echo "Commits Today: $COMMITS" | ||
echo "::set-output name=commits::$COMMITS" | ||
- name: Send Discord Webhook Message | ||
env: | ||
DISCORD_WEBHOOK_URL: ${{ secrets.PROGRESS_ALARM_DISCORD_WEBHOOK_URL }} | ||
run: | | ||
curl -X POST \ | ||
-H "Content-Type: application/json" \ | ||
-d "{ \"content\": \"Today's Commit Summary:\n ${{ steps.commit-info.outputs.commits }}\" }" \ | ||
"$DISCORD_WEBHOOK_URL" |