1
Fork 0
mirror of https://github.com/thegeneralist01/archivr synced 2026-07-21 18:55:36 +02:00

ci: weekly yt-dlp auto-update workflow

This commit is contained in:
TheGeneralist 2026-07-03 18:28:18 +02:00
parent e181fe4c40
commit d3a78da766
Signed by: thegeneralist01
SSH key fingerprint: SHA256:pp9qddbCNmVNoSjevdvQvM5z0DHN7LTa8qBMbcMq/R4
2 changed files with 53 additions and 0 deletions

51
.github/workflows/update-ytdlp.yml vendored Normal file
View file

@ -0,0 +1,51 @@
name: Update yt-dlp
on:
schedule:
- cron: '0 6 * * 1' # Every Monday at 06:00 UTC
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Get current yt-dlp version
id: before
run: |
rev=$(jq -r '.nodes.nixpkgs.locked.rev' flake.lock)
version=$(nix eval --raw "github:nixos/nixpkgs/${rev}#yt-dlp.version")
echo "version=${version}" >> "$GITHUB_OUTPUT"
- name: Update nixpkgs
run: nix flake update nixpkgs
- name: Get new yt-dlp version
id: after
run: |
rev=$(jq -r '.nodes.nixpkgs.locked.rev' flake.lock)
version=$(nix eval --raw "github:nixos/nixpkgs/${rev}#yt-dlp.version")
echo "version=${version}" >> "$GITHUB_OUTPUT"
- name: Open PR if yt-dlp was updated
if: steps.before.outputs.version != steps.after.outputs.version
uses: peter-evans/create-pull-request@v6
with:
branch: auto/yt-dlp-update
delete-branch: true
commit-message: "chore: yt-dlp ${{ steps.before.outputs.version }} → ${{ steps.after.outputs.version }}"
title: "chore: yt-dlp ${{ steps.before.outputs.version }} → ${{ steps.after.outputs.version }}"
body: |
Automated `flake.lock` update. yt-dlp bumped from `${{ steps.before.outputs.version }}` to `${{ steps.after.outputs.version }}`.
Triggered by the weekly nixpkgs check.
labels: dependencies

2
.gitignore vendored
View file

@ -1,6 +1,8 @@
* *
!.gitignore !.gitignore
!.github/
!.github/**
!docs/ !docs/
!docs/LICENSE !docs/LICENSE