Skip to content

Get Recently Updated #125

Get Recently Updated

Get Recently Updated #125

name: Get Recently Updated
on:
workflow_dispatch: {} # Allow manually kicking off builds
schedule:
- cron: '0 12 * * *' # Every day at 12:00 (noon). Ref https://crontab.guru/examples.html
permissions:
contents: write
jobs:
build:
name: get-recently-updated
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run analysis script
id: run_script
run: |
mkdir -p "META-INF"
rm "META-INF/movie"
touch "META-INF/movie"
B=$(find . -maxdepth 1 -type f -name "tt*" -printf '%T@ %p\n' | sort -nr | head -n 25 | cut -d' ' -f2 | cut -d'/' -f2)
for A in ${B}
do
C=$(curl -L "https://v3.sg.media-imdb.com/suggestion/titles/x/${A}.json?includeVideos=0" 2>/dev/null)
echo ${C} >> "META-INF/movie"
done
B=$(find . -mindepth 2 -type f -name "tt*" -printf '%T@ %p\n' | sort -nr | cut -d' ' -f2 | cut -d'/' -f4 | sort | uniq | head -n 25)
rm "META-INF/tvseries"
touch "META-INF/tvseries"
for A in ${B}
do
C=$(curl -L "https://v3.sg.media-imdb.com/suggestion/titles/x/${A}.json?includeVideos=0" 2>/dev/null)
echo ${C} >> "META-INF/tvseries"
done
- name: Commit and Push changes
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: 'ci(auto): Automated Data Recent Updates [skip ci]'
branch: ${{ github.ref_name }} # Ensures it commits to the branch it was run on
commit_user_name: 'github-actions[bot]'
commit_user_email: 'github-actions[bot]@users.noreply.github.com'
commit_author: 'github-actions[bot] <github-actions[bot]@users.noreply.github.com>'