.github/workflows/rss-subscribe.yaml #140
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
on: | |
# see: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows | |
schedule: | |
- cron: "0 9 * * *" # every day at 9:00 AM UTC (4:00 AM EDT, 3:00 AM EST) | |
workflow_dispatch: # allow manual triggering | |
jobs: | |
rss-subscribe: | |
runs-on: ubuntu-latest | |
steps: | |
# See: https://github.com/actions/checkout | |
- uses: actions/checkout@v4 | |
# See: https://docs.astral.sh/uv/guides/integration/github/ | |
- name: Install uv and enable caching | |
uses: astral-sh/setup-uv@v3 | |
with: | |
enable-cache: true | |
cache-dependency-glob: uv.lock | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version-file: pyproject.toml | |
- name: Install the project | |
run: uv sync --all-extras --dev | |
# See: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#setting-an-environment-variable | |
- name: Set PYTHONPATH | |
run: echo "PYTHONPATH=$(pwd)" >> $GITHUB_ENV | |
# TODO: narrow to the relevant tests for this action | |
# - name: Run tests | |
# run: uv run pytest tests | |
# See: https://github.com/1Password/install-cli-action | |
- name: Install 1Password CLI | |
uses: 1password/install-cli-action@v1 | |
- name: Subscribe to unprocessed URLs in Google Sheet | |
run: uv run rss/sheets.py | |
env: | |
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} |