Skip to content

GitHub Self-Updating Stoic Quote #90

GitHub Self-Updating Stoic Quote

GitHub Self-Updating Stoic Quote #90

Workflow file for this run

name: GitHub Self-Updating Stoic Quote
on:
schedule:
- cron: "0 0 * * *" # Runs daily at midnight
workflow_dispatch: # Allows manual triggering
permissions:
contents: write # Grant write permissions
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
jobs:
update-quote:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11" # or your preferred Python version
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
- name: Run script to update README and files
run: python src/main.py --skip-api
- name: Configure Git
run: |
git config --global user.name "Jan Müller"
git config --global user.email "[email protected]"
- name: Commit and Push changes
run: |
now=$(date)
git add .
git commit -m "Auto-update Stoic Quote on $now" || echo "No changes to commit"
git push