ytptube/.github/workflows/update-yt-dlp.yml
2023-11-25 15:15:30 +03:00

41 lines
893 B
YAML

name: update-yt-dlp
on:
workflow_dispatch:
inputs:
logLevel:
description: "Log level"
required: true
default: "warning"
type: choice
options:
- info
- warning
- debug
schedule:
- cron: "0 0 * * *"
jobs:
update-yt-dlp:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Update yt-dlp
run: |
pip install pipenv
pipenv sync
VER=`pipenv run pip list -o | awk '$1 == "yt-dlp" {print $3}'`
if [ -n "$VER" ]; then
pipenv update yt-dlp
fi
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
delete-branch: true