Skip to content

Commit 5f6718b

Browse files
committed
ci: check weeks
1 parent ce305d8 commit 5f6718b

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Week Check πŸ—“οΈ
2+
3+
on:
4+
schedule:
5+
# 맀일 μ˜€μ „ 10μ‹œ, μ˜€ν›„ 6μ‹œ (KST κΈ°μ€€, UTCλ‘œλŠ” 1μ‹œ, 9μ‹œ)
6+
- cron: "0 1,9 * * *"
7+
workflow_dispatch:
8+
9+
jobs:
10+
check-all-prs:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
15+
steps:
16+
- name: Check all PRs via GitHub App
17+
id: check
18+
run: |
19+
echo "πŸ” GitHub App을 톡해 λͺ¨λ“  Open PR 검사 쀑..."
20+
21+
response=$(curl -s -X POST "https://github.dalestudy.com/check-weeks" \
22+
-H "Content-Type: application/json" \
23+
-d "{\"repo_owner\": \"${{ github.repository_owner }}\", \"repo_name\": \"${{ github.event.repository.name }}\"}")
24+
25+
echo "response=$response" >> $GITHUB_OUTPUT
26+
echo "$response" | jq '.'
27+
28+
- name: Summary
29+
run: |
30+
response='${{ steps.check.outputs.response }}'
31+
32+
total=$(echo "$response" | jq -r '.total_prs // 0')
33+
checked=$(echo "$response" | jq -r '.checked // 0')
34+
commented=$(echo "$response" | jq -r '.commented // 0')
35+
deleted=$(echo "$response" | jq -r '.deleted // 0')
36+
37+
echo "## 🎯 Week μ„€μ • 체크 μ™„λ£Œ" >> $GITHUB_STEP_SUMMARY
38+
echo "" >> $GITHUB_STEP_SUMMARY
39+
echo "- πŸ“‹ 전체 Open PR: **$total**개" >> $GITHUB_STEP_SUMMARY
40+
echo "- βœ… κ²€μ‚¬ν•œ PR: **$checked**개" >> $GITHUB_STEP_SUMMARY
41+
echo "- πŸ’¬ λŒ“κΈ€ μž‘μ„±ν•œ PR: **$commented**개" >> $GITHUB_STEP_SUMMARY
42+
echo "- πŸ—‘οΈ λŒ“κΈ€ μ‚­μ œν•œ PR: **$deleted**개" >> $GITHUB_STEP_SUMMARY
43+
echo "" >> $GITHUB_STEP_SUMMARY
44+
echo "λ‹€μŒ 체크: $(date -u -d '+1 hour' +'%Y-%m-%d %H:00 UTC')" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
Β (0)