wxread #141
This file contains 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: wxread | |
on: | |
schedule: | |
- cron: '0 17 * * *' # 每天北京时间凌晨1点执行(UTC时间17点) | |
workflow_dispatch: # 手动触发 | |
jobs: | |
deploy: | |
runs-on: ubuntu-22.04 | |
environment: AutoRead # 指定环境 | |
steps: | |
- name: Set DNS to Google's DNS | |
run: | | |
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf | |
echo "nameserver 8.8.4.4" | sudo tee -a /etc/resolv.conf | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install certifi==2024.8.30 charset-normalizer==3.4.0 idna==3.10 requests==2.32.3 urllib3==2.2.3 | |
- name: Run deployment script | |
env: | |
WXREAD_CURL_BASH: ${{ secrets.WXREAD_CURL_BASH }} | |
PUSH_METHOD: ${{ secrets.PUSH_METHOD }} | |
PUSHPLUS_TOKEN: ${{ secrets.PUSHPLUS_TOKEN }} | |
WXPUSHER_SPT: ${{ secrets.WXPUSHER_SPT }} | |
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} | |
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} | |
READ_NUM: ${{ vars.READ_NUM }} # 使用 Repository Variables | |
run: | | |
python main.py |