diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 1b2b2ba..d9665ab 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -46,3 +46,19 @@ jobs: - name: Build Operational Bundle run: python3 tools/build_bundle.py + + - name: Notify PR Result + if: always() && github.event_name == 'pull_request' + run: | + STATUS="${{ job.status }}" + PR_NUM="${{ github.event.pull_request.number }}" + RUN_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + if [ "$STATUS" = "success" ]; then + MSG="✅ **CI PASS** — gate=PASS step_count=55\n\n[워크플로우 로그](${RUN_URL})" + else + MSG="❌ **CI FAIL** — 로그 확인 필요\n\n[워크플로우 로그](${RUN_URL})" + fi + curl -s -X POST "${{ github.api_url }}/repos/${{ github.repository }}/issues/${PR_NUM}/comments" \ + -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Content-Type: application/json" \ + -d "{\"body\":\"${MSG}\"}"