Daily Shortwave Frequency Update #387
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: Daily Shortwave Frequency Update | |
| on: | |
| schedule: | |
| # 매일 UTC 00:00에 실행 (한국 시간으로 오전 9시) | |
| - cron: '0 0 * * *' | |
| workflow_dispatch: # 수동으로 워크플로우를 실행할 수 있는 옵션 추가 | |
| jobs: | |
| update-frequencies: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install requests beautifulsoup4 | |
| - name: Run frequency update script | |
| run: | | |
| python update_frequencies.py | |
| - name: Configure Git | |
| run: | | |
| git config --global user.name "GitHub Actions Bot" | |
| git config --global user.email "actions@github.com" | |
| - name: Commit and push if changes | |
| run: | | |
| git add . | |
| timestamp=$(date '+%Y-%m-%d %H:%M:%S') | |
| git diff --quiet && git diff --staged --quiet || git commit -m "[Update] $timestamp frequency_manager_list.json" | |
| git push |