Skip to content

Commit

Permalink
feat: progress_alram.yml 추가 #443
Browse files Browse the repository at this point in the history
  • Loading branch information
novice0840 committed Dec 30, 2024
1 parent 29f7519 commit b3b55d5
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/progress_alarm.yml
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"

0 comments on commit b3b55d5

Please sign in to comment.