-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 1.02 KB
/
update-recent.yml
File metadata and controls
42 lines (35 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Update Recent Solutions
on:
push:
branches: [ main ]
schedule:
- cron: "0 0 * * *" # 매일 00:00 UTC (KST 09:00)
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write
env:
LIMIT: "20" # 최근 항목 개수 (원하면 15, 20 등으로 변경)
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # 전체 히스토리 필요
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Run updater
run: |
python3 scripts/update-recent.py
- name: Commit & Push if changed
run: |
if git diff --quiet README.md; then
echo "No README changes."
else
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add README.md
git commit -m "chore(readme): auto-update recent solutions"
git push
fi