Skip to content

Update Preview Image #85

Update Preview Image

Update Preview Image #85

Workflow file for this run

name: Update Preview Image
on:
schedule:
- cron: '0 2 * * 0' # Runs every Sunday at 2 AM UTC
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: setup python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: run script
run: |
python -m pip install --upgrade pip
pip install -r code/requirements.txt
python code/script.py
- name: Commit and push if it changed
run: |
git config user.name "Update-Img Bot"
git config user.email "[email protected]"
git add -A
timestamp=$(date -u)
git commit -m "Automated update: ${timestamp}" || exit 0
git push