Skip to content

Capture Frame and Upload Image #10

Capture Frame and Upload Image

Capture Frame and Upload Image #10

Workflow file for this run

name: Capture Frame and Upload Image
on:
schedule:
- cron: "*/30 * * * *"
workflow_dispatch: # This allows manual triggering of the workflow
jobs:
capture_frame:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install yt-dlp
run: sudo apt-get install python3-pip && pip install -U pip hatchling wheel && pip install --force-reinstall "yt-dlp[default] @ https://github.com/yt-dlp/yt-dlp/archive/master.tar.gz"
- name: Capture Frame
run: ffmpeg -i "$(yt-dlp -g https://www.youtube.com/watch?v=moQtMet7F7w | head -n 1)" -vframes 1 capture.jpg
- name: Commit and Push changes
run: |
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
git add capture.jpg
git commit -m "Captured frame"
git push