[fix]: currentDateRef 업데이트 오류 수정 #509
This file contains hidden or 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
| name: Notify Discord on PR events | |
| on: | |
| pull_request: | |
| types: [opened, closed, reopened] | |
| jobs: | |
| notify-discord: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Determine PR event | |
| id: msg | |
| run: | | |
| if [[ "${{ github.event.action }}" == "opened" ]]; then | |
| echo "message= PR Opened: **${{ github.event.pull_request.title }}**" >> $GITHUB_OUTPUT | |
| elif [[ "${{ github.event.action }}" == "reopened" ]]; then | |
| echo "message= PR Reopened: **${{ github.event.pull_request.title }}**" >> $GITHUB_OUTPUT | |
| elif [[ "${{ github.event.action }}" == "closed" && "${{ github.event.pull_request.merged }}" == "true" ]]; then | |
| echo "message= PR Merged: **${{ github.event.pull_request.title }}**" >> $GITHUB_OUTPUT | |
| else | |
| echo "message= PR Closed without merge: **${{ github.event.pull_request.title }}**" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Send Discord notification | |
| env: | |
| DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK }} | |
| run: | | |
| curl -H "Content-Type: application/json" \ | |
| -X POST \ | |
| -d "{\"content\": \"${{ steps.msg.outputs.message }}\\n[PR #${{ github.event.pull_request.number }}](${{ github.event.pull_request.html_url }}) by @${{ github.actor }}\"}" \ | |
| "$DISCORD_WEBHOOK_URL" |