Files
metube/.github/workflows/update-yt-dlp.yml
T
dependabot[bot] 015fe9e65a Bump actions/checkout from 6 to 7 in the github-actions group
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout).


Updates `actions/checkout` from 6 to 7
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-21 16:12:26 +00:00

42 lines
1.3 KiB
YAML

name: update-yt-dlp
on:
schedule:
- cron: '0 0 * * *'
jobs:
update-yt-dlp :
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v7
with:
token: ${{ secrets.AUTOUPDATE_PAT }}
-
name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
-
name: Install uv
uses: astral-sh/setup-uv@v7
-
name: Update yt-dlp
run: |
uv sync --locked
# Check if yt-dlp has updates available
LATEST_VERSION=$(uv pip list --outdated --format json | jq -r '.[] | select(.name == "yt-dlp") | .latest_version')
CURRENT_VERSION=$(uv pip list --format json | jq -r '.[] | select(.name == "yt-dlp") | .version')
if [ -n "$LATEST_VERSION" ] && [ "$LATEST_VERSION" != "$CURRENT_VERSION" ]; then
echo "Updating yt-dlp from $CURRENT_VERSION to $LATEST_VERSION"
uv lock --upgrade-package "yt-dlp[default,curl-cffi]"
git config --global user.email "updater@metube"
git config --global user.name "AutoUpdater"
git add uv.lock
git commit -m "upgrade yt-dlp from $CURRENT_VERSION to $LATEST_VERSION"
git push
else
echo "yt-dlp is already up to date ($CURRENT_VERSION)"
fi