Skip to content

Update README with recent blog posts #107

Update README with recent blog posts

Update README with recent blog posts #107

Workflow file for this run

name: Update README with recent blog posts
on:
schedule:
- cron: '0 */12 * * *' # Run every 12 hours
workflow_dispatch:
push:
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.3
with:
repository: ${{ github.repository }}
fetch-depth: 1
- name: Set up Python
uses: actions/setup-python@v5.1.0
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install feedparser
- name: Update README
run: python update_readme.py
- name: Check for changes
id: git-check
run: |
git status
git diff
git diff --quiet || echo "changes=true" >> $GITHUB_OUTPUT
- name: Commit changes
if: steps.git-check.outputs.changes == 'true'
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add profile/README.md
git commit -m "Updated README with latest blog posts"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: No changes
if: steps.git-check.outputs.changes != 'true'
run: echo "No changes to commit"