Skip to content

Update Feed

Update Feed #30

Workflow file for this run

name: Update Feed
# on:
# push:
# branches: [ "main" ]
# pull_request:
# branches: [ "main" ]
on:
schedule:
- cron: '0 1 * * *' # daily update
workflow_dispatch:
jobs:
update_feed:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
# cache: 'pip' # needs a requirements.txt
- name: Run update script
run: python ./src/update_feed.py
- name: commit updates (if available)
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git add .
if [ -z "$(git status --porcelain)" ]; then
echo "No updates available"
exit 0
fi
git commit -m "new update"
git push origin main
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install flake8 pytest
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# - name: Lint with Ruff
# run: |
# pip install ruff
# ruff --output-format=github .
# - name: Test with pytest
# run: |
# pytest