From 9baf3b9eb7b093029300614bc9c1a913a73fb003 Mon Sep 17 00:00:00 2001 From: raiper34 Date: Sat, 1 Feb 2025 15:11:24 +0100 Subject: [PATCH] ci(github-actions): add automatic ytdl update into github actions --- .github/workflows/update-ytdl.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/update-ytdl.yml diff --git a/.github/workflows/update-ytdl.yml b/.github/workflows/update-ytdl.yml new file mode 100644 index 0000000..a16a64a --- /dev/null +++ b/.github/workflows/update-ytdl.yml @@ -0,0 +1,30 @@ +name: update-ytdl + +on: + workflow_dispatch: + branches: ytdl-update-automated + schedule: + - cron: '0 0 * * *' + +jobs: + update-ytdl: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up Node + uses: actions/setup-node@v2 + with: + node-version: '18.x' + - name: Update @distube/ytdl-core + run: npm update @distube/ytdl-core -w backend + - name: Commit and create PR + uses: peter-evans/create-pull-request@v3 + with: + title: 'build(ytdl): Upgrade ytdl package (automated)' + branch: 'ytdl-update-automated' + commit-message: 'build(ytdl): Upgrade ytdl package (automated)' + - name: Merge ytdl-update-automated PR + run: gh pr merge --merge --auto "1" + env: + GH_TOKEN: ${{ github.token }}