Add 0153-find-minimum-in-rotated-sorted-array to topics. #686
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
| name: Update Recent Solutions | |
| on: | |
| push: | |
| branches: [ main ] | |
| schedule: | |
| - cron: "0 0 * * *" # 매일 00:00 UTC (KST 09:00) | |
| workflow_dispatch: | |
| concurrency: | |
| group: update-recent-${{ github.ref }} | |
| cancel-in-progress: false | |
| 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." | |
| exit 0 | |
| fi | |
| 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" | |
| # 원격이 앞서있을 수 있으니 rebase 후 재시도 (최대 5회, jittered backoff) | |
| for i in 1 2 3 4 5; do | |
| if git push; then | |
| echo "Pushed on attempt $i." | |
| exit 0 | |
| fi | |
| echo "Push rejected (attempt $i). Rebasing on latest origin/main and retrying..." | |
| if ! git pull --rebase --autostash origin main; then | |
| echo "Rebase failed on attempt $i; aborting rebase." >&2 | |
| git rebase --abort || true | |
| exit 1 | |
| fi | |
| sleep $((RANDOM % 5 + i)) | |
| done | |
| echo "Failed to push after 5 attempts." >&2 | |
| exit 1 |