[Refactor] 응원 등록 이미지 트랜잭션 분리 및 보상 트랜잭션 적용 #512
Workflow file for this run
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
| on: | |
| pull_request: | |
| types: [ opened ] | |
| pull_request_review: | |
| types: [ submitted ] | |
| jobs: | |
| notify-discord: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Send Discord Webhook, Skip if review is just a comment | |
| if: github.event.review.state != 'commented' | |
| run: | | |
| PR_URL="https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number || github.event.pull_request_review.pull_request.number }}" | |
| AUTHOR="${{ github.event.pull_request.user.login || github.event.review.user.login }}" | |
| TITLE="${{ github.event.pull_request.title || github.event.pull_request_review.pull_request.title }}" | |
| REVIEW_STATE="${{ github.event.review.state || '' }}" | |
| CONTENT="" | |
| if [ "${{ github.event_name }}" = "pull_request" ]; then | |
| CONTENT="📌 새 PR이 생성되었습니다!\n🔗 ${PR_URL}\n📄 제목: ${TITLE}\n🙋 작성자: ${AUTHOR}" | |
| elif [ "${{ github.event_name }}" = "pull_request_review" ]; then | |
| CONTENT="🔍 PR에 리뷰가 생성되었습니다! (${REVIEW_STATE})\n🔗 ${PR_URL}\n🙋 리뷰어: ${AUTHOR}" | |
| fi | |
| curl -H "Content-Type: application/json" \ | |
| -X POST \ | |
| -d "{\"content\": \"${CONTENT}\"}" \ | |
| ${{ secrets.DISCORD_WEBHOOK }} |