metube/.github/workflows/update-yt-dlp.yml

34 lines
819 B
YAML
Raw Permalink Normal View History

name: update-yt-dlp
2021-03-14 18:46:22 +00:00
2021-11-13 18:07:14 +00:00
on:
schedule:
- cron: '0 0 * * *'
2021-03-14 18:46:22 +00:00
jobs:
update-yt-dlp :
2021-03-14 18:46:22 +00:00
runs-on: ubuntu-latest
steps:
-
name: Checkout
2023-09-25 05:57:55 +00:00
uses: actions/checkout@v4
2021-03-14 18:46:22 +00:00
with:
token: ${{ secrets.AUTOUPDATE_PAT }}
-
name: Set up Python
2023-09-25 05:57:55 +00:00
uses: actions/setup-python@v4
2021-03-14 18:46:22 +00:00
with:
2023-12-12 11:26:46 +00:00
python-version: '3.11'
2021-03-14 18:46:22 +00:00
-
name: Update yt-dlp
2021-03-14 18:46:22 +00:00
run: |
pip install pipenv
pipenv sync
VER=`pipenv run pip list -o | awk '$1 == "yt-dlp" {print $3}'`
2021-03-14 18:46:22 +00:00
if [ -n "$VER" ]; then
2023-09-25 05:57:55 +00:00
pipenv update yt-dlp
2021-03-14 18:46:22 +00:00
git config --global user.email "updater@metube"
git config --global user.name "AutoUpdater"
git commit -m 'upgraded yt-dlp' Pipfile.lock
2021-03-14 18:46:22 +00:00
git push
fi