Skip to content

Commit 5dbef0d

Browse files
committed
ci: check prs
1 parent e1adcc7 commit 5dbef0d

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/check-prs.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: PR Check 🔔
2+
3+
on:
4+
schedule:
5+
# 매일 오전 10시, 오후 6시 (KST 기준, UTC로는 1시, 9시)
6+
- cron: "0 1,9 * * *"
7+
workflow_dispatch:
8+
pull_request:
9+
10+
jobs:
11+
check-all-prs:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read # 기본 읽기 권한만 필요 (Worker가 모든 작업 처리)
15+
16+
steps:
17+
- name: Check all PRs via Worker
18+
id: check
19+
run: |
20+
echo "🔍 Cloudflare Worker를 통해 모든 Open PR 검사 중..."
21+
22+
WORKER_URL="https://dalestudy.daleseo.workers.dev"
23+
24+
response=$(curl -s -X POST "$WORKER_URL/check-all-prs" \
25+
-H "Content-Type: application/json" \
26+
-d "{\"repo_owner\": \"${{ github.repository_owner }}\", \"repo_name\": \"${{ github.event.repository.name }}\"}")
27+
28+
echo "response=$response" >> $GITHUB_OUTPUT
29+
echo "$response" | jq '.'
30+
31+
- name: Summary
32+
run: |
33+
response='${{ steps.check.outputs.response }}'
34+
35+
total=$(echo "$response" | jq -r '.total_prs // 0')
36+
checked=$(echo "$response" | jq -r '.checked // 0')
37+
commented=$(echo "$response" | jq -r '.commented // 0')
38+
39+
echo "## 🎯 Week 설정 체크 완료" >> $GITHUB_STEP_SUMMARY
40+
echo "" >> $GITHUB_STEP_SUMMARY
41+
echo "- 📋 전체 Open PR: **$total**개" >> $GITHUB_STEP_SUMMARY
42+
echo "- ✅ 검사한 PR: **$checked**개" >> $GITHUB_STEP_SUMMARY
43+
echo "- 💬 댓글 작성한 PR: **$commented**개" >> $GITHUB_STEP_SUMMARY
44+
echo "" >> $GITHUB_STEP_SUMMARY
45+
echo "다음 체크: $(date -u -d '+1 hour' +'%Y-%m-%d %H:00 UTC')" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)