Skip to content

Update Letterboxd Data #1402

Update Letterboxd Data

Update Letterboxd Data #1402

Workflow file for this run

name: Update Letterboxd Data
on:
schedule:
- cron: '*/720 * * * *' # Runs every 30 minutes
workflow_dispatch:
permissions:
contents: write
jobs:
update-data:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: fellowjamess/movie
fetch-depth: 1
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests beautifulsoup4 Pillow
- name: Run script
run: python update_letterboxd_data.py
- name: Commit and push if changed
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add -A
git diff --quiet && git diff --staged --quiet || (git commit -m "Update Letterboxd data" && git push)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}