today #21575
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: today | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 * * * *" | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
# env: | |
# RSSHUB_CUSTOM_ADDR: http://82.157.186.108:1200 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
id: setup-python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: setup poetry | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
- name: cache dependencies | |
id: cache-dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
.venv | |
key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-poetry-${{ hashFiles('poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cache-dependencies.outputs.cache-hit != 'true' | |
run: | | |
poetry install | |
# - name: weibo | |
# continue-on-error: true | |
# run: | | |
# poetry run python3 weibo.py | |
- name: zhihu | |
continue-on-error: true | |
run: | | |
poetry run python3 zhihu.py | |
- name: rss | |
continue-on-error: true | |
run: | | |
poetry run python3 rss.py | |
- name: push | |
run: | | |
git config user.name 'github-actions[bot]' | |
git config user.email 'github-actions[bot]@users.noreply.github.com' | |
git add . | |
git diff-index --quiet HEAD || git commit -am 'update data by action' | |
git push origin master |