From b3b55d5a9346632c842a31dfadd3d811aa4d4f3a Mon Sep 17 00:00:00 2001 From: novice0840 Date: Mon, 30 Dec 2024 21:10:38 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20progress=5Falram.yml=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20#443?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/progress_alarm.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/progress_alarm.yml diff --git a/.github/workflows/progress_alarm.yml b/.github/workflows/progress_alarm.yml new file mode 100644 index 00000000..a6f6a520 --- /dev/null +++ b/.github/workflows/progress_alarm.yml @@ -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"