Skip to content

Update-IMDb-Hash

Update-IMDb-Hash #567

Workflow file for this run

name: Update-IMDb-Hash
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
push:
pull_request:
jobs:
Update-IMDb-Hash:
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "date=$(date +'%B %d, %Y %I:%M %p')" >> $GITHUB_OUTPUT
- name: Check Out Repo
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install Requirements
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Update IMDb Hash
run: python get-imdb-sha256.py
- name: Check Diff
id: verify_diff
run: |
git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT
- name: Commit & Push Changes
if: steps.verify_diff.outputs.changed == 'true'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add -A
git commit -m "Update at ${{ steps.date.outputs.date }} UTC" -a
git push origin main