Daily Yiyan #54
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 Yiyan | |
| on: | |
| schedule: | |
| # 每5分钟运行一次(UTC时间) | |
| # 如需北京时间每天9点运行,改为:0 1 * * * (UTC 1点 = 北京9点) | |
| - cron: '0 0 * * *' | |
| workflow_dispatch: # 支持手动触发 | |
| jobs: | |
| daily-yiyan: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Run main script | |
| env: | |
| NOTIFY_TYPE: ${{ secrets.NOTIFY_TYPE }} | |
| YIYAN_API_ID: ${{ secrets.YIYAN_API_ID }} | |
| YIYAN_API_KEY: ${{ secrets.YIYAN_API_KEY }} | |
| SERVERCHAN_KEY: ${{ secrets.SERVERCHAN_KEY }} | |
| SMTP_HOST: ${{ secrets.SMTP_HOST }} | |
| SMTP_PORT: ${{ secrets.SMTP_PORT }} | |
| SMTP_USERNAME: ${{ secrets.SMTP_USERNAME }} | |
| SMTP_PASSWORD: ${{ secrets.SMTP_PASSWORD }} | |
| EMAIL_FROM: ${{ secrets.EMAIL_FROM }} | |
| EMAIL_TO: ${{ secrets.EMAIL_TO }} | |
| run: python main.py |